Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleRegexp_FindAllSubmatch (1.13 sec)

  1. src/regexp/example_test.go

    	// "food"
    }
    
    func ExampleRegexp_FindAll() {
    	re := regexp.MustCompile(`foo.?`)
    	fmt.Printf("%q\n", re.FindAll([]byte(`seafood fool`), -1))
    
    	// Output:
    	// ["food" "fool"]
    }
    
    func ExampleRegexp_FindAllSubmatch() {
    	re := regexp.MustCompile(`foo(.?)`)
    	fmt.Printf("%q\n", re.FindAllSubmatch([]byte(`seafood fool`), -1))
    
    	// Output:
    	// [["food" "d"] ["fool" "l"]]
    }
    
    func ExampleRegexp_FindSubmatch() {
    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