Commit b4f370ca authored by Rob Pike's avatar Rob Pike

regexp/syntax: make it clearer that \b and \B are ASCII-defined

Fixes #5896.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12645043
parent 077989cf
...@@ -64,8 +64,8 @@ Empty strings: ...@@ -64,8 +64,8 @@ Empty strings:
^ at beginning of text or line (flag m=true) ^ at beginning of text or line (flag m=true)
$ at end of text (like \z not \Z) or line (flag m=true) $ at end of text (like \z not \Z) or line (flag m=true)
\A at beginning of text \A at beginning of text
\b at word boundary (\w on one side and \W, \A, or \z on the other) \b at ASCII word boundary (\w on one side and \W, \A, or \z on the other)
\B not a word boundary \B not an ASCII word boundary
\z at end of text \z at end of text
Escape sequences: Escape sequences:
...@@ -104,8 +104,8 @@ Perl character classes: ...@@ -104,8 +104,8 @@ Perl character classes:
\D not digits (== [^0-9]) \D not digits (== [^0-9])
\s whitespace (== [\t\n\f\r ]) \s whitespace (== [\t\n\f\r ])
\S not whitespace (== [^\t\n\f\r ]) \S not whitespace (== [^\t\n\f\r ])
\w word characters (== [0-9A-Za-z_]) \w ASCII word characters (== [0-9A-Za-z_])
\W not word characters (== [^0-9A-Za-z_]) \W not ASCII word characters (== [^0-9A-Za-z_])
ASCII character classes: ASCII character classes:
[:alnum:] alphanumeric (== [0-9A-Za-z]) [:alnum:] alphanumeric (== [0-9A-Za-z])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment