Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
9f5b822f
Commit
9f5b822f
authored
Sep 04, 2001
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert docstring to "raw" string.
parent
54e54c68
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
Lib/sre.py
Lib/sre.py
+13
-13
No files found.
Lib/sre.py
View file @
9f5b822f
...
...
@@ -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 M
atches only at the start of the string.
\
Z M
atches only at the end of the string.
\b Matches the empty string, but only at the start or end of a word.
\
B M
atches the empty string, but not at the start or end of a word.
\
d M
atches any decimal digit; equivalent to the set [0-9].
\
D M
atches any non-digit character; equivalent to the set [^0-9].
\
s M
atches any whitespace character; equivalent to [ \t\n\r\f
\v].
\
S M
atches any non-whitespace character; equiv. to [^ \t\n\r\f
\v].
\
w M
atches 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 M
atches 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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment