diff options
author | Rob Pike <r@golang.org> | 2010-08-09 15:11:02 -0700 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2010-08-09 15:11:02 -0700 |
commit | 46db2e3c25f417008d2e639781169702104a9ef2 (patch) | |
tree | 8ee03b04f9de4103aeb62c328ea15c6f84bd5abc | |
parent | d5cfb3b3d5c710945ca894807625ed8ddea04f97 (diff) | |
download | go-46db2e3c25f417008d2e639781169702104a9ef2.tar.gz go-46db2e3c25f417008d2e639781169702104a9ef2.zip |
regexp: document that backslashes are the escape character.
Fixes #1013.
R=rsc, gri
CC=golang-dev
https://golang.org/cl/1938041
-rw-r--r-- | src/pkg/regexp/regexp.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pkg/regexp/regexp.go b/src/pkg/regexp/regexp.go index 4dd430ea69..aa90eb321b 100644 --- a/src/pkg/regexp/regexp.go +++ b/src/pkg/regexp/regexp.go @@ -16,8 +16,14 @@ // '$' // '.' // 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 |