gobyexample/examples/regular-expressions/regular-expressions.sh
2022-06-06 11:31:46 -07:00

18 lines
317 B
Bash

$ go run regular-expressions.go
true
true
peach
idx: [0 5]
[peach ea]
[0 5 1 3]
[peach punch pinch]
all: [[0 5 1 3] [6 11 7 9] [12 17 13 15]]
[peach punch]
true
regexp: p([a-z]+)ch
a <fruit>
a PEACH
# For a complete reference on Go regular expressions check
# the [`regexp`](https://pkg.go.dev/regexp) package docs.