explain variants
This commit is contained in:
parent
af5f06f263
commit
f61bd8bb50
@ -46,6 +46,11 @@ func main() {
|
||||
// example to find all matches for a regexp.
|
||||
fmt.Println(r.FindAllString("peach punch pinch", -1))
|
||||
|
||||
// These `All` variants are available for the other
|
||||
// functions we saw above as well.
|
||||
fmt.Println(r.FindAllStringSubmatchIndex(
|
||||
"peach punch pinch", -1))
|
||||
|
||||
// Providing a non-negative integer as the second
|
||||
// argument to these functions will limit the number
|
||||
// of matches.
|
||||
|
@ -6,6 +6,7 @@ peach
|
||||
[peach ea]
|
||||
[0 5 1 3]
|
||||
[peach punch pinch]
|
||||
[[0 5 1 3] [6 11 7 9] [12 17 13 15]]
|
||||
[peach punch]
|
||||
true
|
||||
p([a-z]+)ch
|
||||
|
Loading…
x
Reference in New Issue
Block a user