1
0
mirror of https://github.com/golang/go synced 2024-11-20 03:34:40 -07:00
go/src/regexp
Matej Baćo 1fe1512f50 regexp: examples for Regexp.Expand and Regexp.ExpandString functions
Current documentation lacks simple examples for functions Regexp.Expand
and Regexp.ExpandString whose usage is unclear from description alone.
This commit adds examples that demonstrate usage in practical way.

Fixes #21649

Change-Id: I7b2c06c8ab747f69a6578f0595bf0f3c742ac479
Reviewed-on: https://go-review.googlesource.com/59470
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-08-28 15:34:19 +00:00
..
syntax
testdata
all_test.go regexp: speed up QuoteMeta with a lookup table 2017-04-28 06:43:14 +00:00
backtrack.go
example_test.go regexp: examples for Regexp.Expand and Regexp.ExpandString functions 2017-08-28 15:34:19 +00:00
exec2_test.go
exec_test.go regexp: reduce allocs in regexp.Match for onepass regex 2017-03-23 00:02:55 +00:00
exec.go regexp: reduce allocs in regexp.Match for onepass regex 2017-03-23 00:02:55 +00:00
find_test.go
onepass_test.go regexp: reduce allocations at onePassCopy 2017-03-28 17:58:10 +00:00
onepass.go regexp: remove redundant break 2017-04-25 15:00:06 +00:00
regexp.go regexp: speed up QuoteMeta with a lookup table 2017-04-28 06:43:14 +00:00