]> Cypherpunks repositories - gostls13.git/commitdiff
regexp: update comment on (*Regexp).Longest
authorAndrew Gerrand <adg@golang.org>
Mon, 4 Feb 2013 04:57:32 +0000 (15:57 +1100)
committerAndrew Gerrand <adg@golang.org>
Mon, 4 Feb 2013 04:57:32 +0000 (15:57 +1100)
Missed this review comment.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7229084

src/pkg/regexp/regexp.go

index c0ecc01c357cbbf6241afa702f3ba02c70b24e47..3aa16dec60672359810e2c25e3640a5c0714d6b5 100644 (file)
@@ -130,7 +130,7 @@ func CompilePOSIX(expr string) (*Regexp, error) {
        return compile(expr, syntax.POSIX, true)
 }
 
-// Longest sets the match semantics of the regexp to leftmost-longest.
+// Longest makes future searches prefer the leftmost-longest match.
 // That is, when matching against text, the regexp returns a match that
 // begins as early as possible in the input (leftmost), and among those
 // it chooses a match that is as long as possible.