gobyexample/examples/regular-expressions/regular-expressions.sh
Eli Bendersky 4de485a514 Add partial prefixes in some places to regular-expressions
See #394 for details.

This closes #288 by providing a lighter-weight approach.
2021-09-10 05:56:40 -07:00

18 lines
321 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`](http://golang.org/pkg/regexp/) package docs.