diff options
author | Fred Drake <fdrake@acm.org> | 2001-09-04 19:20:06 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-09-04 19:20:06 (GMT) |
commit | 9f5b822fb3aa08d3cf4a89d33c6c69ad1843a661 (patch) | |
tree | 9600daf72e00192803efab2253b8ee3e32d11992 /Lib/sre.py | |
parent | 54e54c6877329e105406c48490f218faff59db39 (diff) | |
download | cpython-9f5b822fb3aa08d3cf4a89d33c6c69ad1843a661.zip cpython-9f5b822fb3aa08d3cf4a89d33c6c69ad1843a661.tar.gz cpython-9f5b822fb3aa08d3cf4a89d33c6c69ad1843a661.tar.bz2 |
Convert docstring to "raw" string.
Diffstat (limited to 'Lib/sre.py')
-rw-r--r-- | Lib/sre.py | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -14,7 +14,7 @@ # other compatibility work. # -"""Support for regular expressions (RE). +r"""Support for regular expressions (RE). This module provides regular expression matching operations similar to those found in Perl. It's 8-bit clean: the strings being processed may @@ -56,20 +56,20 @@ The special characters are: The special sequences consist of "\\" and a character from the list below. If the ordinary character is not on the list, then the resulting RE will match the second character. - \\number Matches the contents of the group of the same number. - \\A Matches only at the start of the string. - \\Z Matches only at the end of the string. - \\b Matches the empty string, but only at the start or end of a word. - \\B Matches the empty string, but not at the start or end of a word. - \\d Matches any decimal digit; equivalent to the set [0-9]. - \\D Matches any non-digit character; equivalent to the set [^0-9]. - \\s Matches any whitespace character; equivalent to [ \\t\\n\\r\\f\\v]. - \\S Matches any non-whitespace character; equiv. to [^ \\t\\n\\r\\f\\v]. - \\w Matches any alphanumeric character; equivalent to [a-zA-Z0-9_]. + \number Matches the contents of the group of the same number. + \A Matches only at the start of the string. + \Z Matches only at the end of the string. + \b Matches the empty string, but only at the start or end of a word. + \B Matches the empty string, but not at the start or end of a word. + \d Matches any decimal digit; equivalent to the set [0-9]. + \D Matches any non-digit character; equivalent to the set [^0-9]. + \s Matches any whitespace character; equivalent to [ \t\n\r\f\v]. + \S Matches any non-whitespace character; equiv. to [^ \t\n\r\f\v]. + \w Matches any alphanumeric character; equivalent to [a-zA-Z0-9_]. With LOCALE, it will match the set [0-9_] plus characters defined as letters for the current locale. - \\W Matches the complement of \\w. - \\\\ Matches a literal backslash. + \W Matches the complement of \w. + \\ Matches a literal backslash. This module exports the following functions: match Match a regular expression pattern to the beginning of a string. |