]> Cypherpunks repositories - gostls13.git/commitdiff
regexp: document that backslashes are the escape character.
authorRob Pike <r@golang.org>
Mon, 9 Aug 2010 22:11:02 +0000 (15:11 -0700)
committerRob Pike <r@golang.org>
Mon, 9 Aug 2010 22:11:02 +0000 (15:11 -0700)
Fixes #1013.

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

src/pkg/regexp/regexp.go

index 4dd430ea6990f59fa31d9647d7814ad322af3a06..aa90eb321b665a73272f9df785dd35d93beb947e 100644 (file)
 //             '$'
 //             '.'
 //             character
-//             '[' [ '^' ] character-ranges ']'
+//             '[' [ '^' ] { character-range } ']'
 //             '(' regexp ')'
+//     character-range:
+//             character '-' character
+//
+// All characters are UTF-8-encoded code points.
+// Backslashes escape special characters, including inside
+// character classes.
 //
 package regexp