mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
regexp: bug fix: need to track whether match begins with fixed prefix.
Fixes #872. R=rsc CC=golang-dev https://golang.org/cl/1731043
This commit is contained in:
parent
537e5f4b7e
commit
a8cd6c2012
2 changed files with 20 additions and 17 deletions
|
|
@ -100,7 +100,8 @@ var matches = []tester{
|
|||
|
||||
// fixed bugs
|
||||
tester{`ab$`, "cab", vec{1, 3}},
|
||||
tester{`axxb$`, "axxcb", vec{}},
|
||||
tester{`data`, "daXY data", vec{5, 9}},
|
||||
tester{`da(.)a$`, "daXY data", vec{5, 9, 7, 8}},
|
||||
|
||||
// can backslash-escape any punctuation
|
||||
tester{`\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\{\|\}\~`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue