]> Cypherpunks repositories - gostls13.git/commitdiff
regexp: document that it is linear in the input size.
authorRob Pike <r@golang.org>
Tue, 25 Mar 2014 00:17:30 +0000 (11:17 +1100)
committerRob Pike <r@golang.org>
Tue, 25 Mar 2014 00:17:30 +0000 (11:17 +1100)
Fixes #7488.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/78050043

src/pkg/regexp/regexp.go

index 04818794cf0417a44accc2c6c298863ec472d27a..cca21e750e2d4d5e805ccc611fa6644fef737410 100644 (file)
 // For an overview of the syntax, run
 //   godoc regexp/syntax
 //
+// The regexp implementation provided by this package is
+// guaranteed to run in time linear in the size of the input.
+// (This is a property not guaranteed by most open source
+// implementations of regular expressions.) For more information
+// about this property, see
+//     http://swtch.com/~rsc/regexp/regexp1.html
+// or any book about automata theory.
+//
 // All characters are UTF-8-encoded code points.
 //
 // There are 16 methods of Regexp that match a regular expression and identify