]> Cypherpunks repositories - gostls13.git/commit
regexp: fix prefix bug.
authorRob Pike <r@golang.org>
Mon, 3 Jan 2011 19:35:34 +0000 (11:35 -0800)
committerRob Pike <r@golang.org>
Mon, 3 Jan 2011 19:35:34 +0000 (11:35 -0800)
commit15cb7ed34f5d755bf17734a6187958983471480c
tree931e1a0b5b08ace11ab5175fd8bb4e0d4a542e2a
parentc0d0d4ef05378c6a297e36c60b7af2b799f5653f
regexp: fix prefix bug.
After a prefix match, the old code advanced the length of the
prefix.  This is incorrect since the full match might begin
in the middle of the prefix. (Consider "aaaab+" matching
"aaaaaab").

Fixes #1373

R=rsc
CC=golang-dev
https://golang.org/cl/3795044
src/pkg/regexp/find_test.go
src/pkg/regexp/regexp.go