Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleRegexp_Split (0.12 sec)

  1. src/regexp/example_test.go

    	lastIndex := re.SubexpIndex("last")
    	fmt.Printf("last => %d\n", lastIndex)
    	fmt.Println(matches[lastIndex])
    	// Output:
    	// true
    	// last => 2
    	// Turing
    }
    
    func ExampleRegexp_Split() {
    	a := regexp.MustCompile(`a`)
    	fmt.Println(a.Split("banana", -1))
    	fmt.Println(a.Split("banana", 0))
    	fmt.Println(a.Split("banana", 1))
    	fmt.Println(a.Split("banana", 2))
    	zp := regexp.MustCompile(`z+`)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 07 00:22:53 UTC 2023
    - 11.1K bytes
    - Viewed (0)
Back to top