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
9587a7a7
Commit
9587a7a7
authored
Jan 21, 2008
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify $ behavior in re docstring. #1631394.
parent
32a17137
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
Lib/re.py
Lib/re.py
+6
-3
No files found.
Lib/re.py
View file @
9587a7a7
...
@@ -29,7 +29,8 @@ concatenate ordinary characters, so last matches the string 'last'.
...
@@ -29,7 +29,8 @@ concatenate ordinary characters, so last matches the string 'last'.
The special characters are:
The special characters are:
"." Matches any character except a newline.
"." Matches any character except a newline.
"^" Matches the start of the string.
"^" Matches the start of the string.
"$" Matches the end of the string.
"$" Matches the end of the string or just before the newline at
the end of the string.
"*" Matches 0 or more (greedy) repetitions of the preceding RE.
"*" Matches 0 or more (greedy) repetitions of the preceding RE.
Greedy means that it will match as many repetitions as possible.
Greedy means that it will match as many repetitions as possible.
"+" Matches 1 or more (greedy) repetitions of the preceding RE.
"+" Matches 1 or more (greedy) repetitions of the preceding RE.
...
@@ -83,8 +84,10 @@ This module exports the following functions:
...
@@ -83,8 +84,10 @@ This module exports the following functions:
Some of the functions in this module takes flags as optional parameters:
Some of the functions in this module takes flags as optional parameters:
I IGNORECASE Perform case-insensitive matching.
I IGNORECASE Perform case-insensitive matching.
L LOCALE Make \
w,
\W, \b, \
B, depe
ndent on the current locale.
L LOCALE Make \
w,
\W, \b, \
B, depe
ndent on the current locale.
M MULTILINE "^" matches the beginning of lines as well as the string.
M MULTILINE "^" matches the beginning of lines (after a newline)
"$" matches the end of lines as well as the string.
as well as the string.
"$" matches the end of lines (before a newline) as well
as the end of the string.
S DOTALL "." matches any character at all, including the newline.
S DOTALL "." matches any character at all, including the newline.
X VERBOSE Ignore whitespace and comments for nicer looking RE's.
X VERBOSE Ignore whitespace and comments for nicer looking RE's.
U UNICODE Make \
w,
\W, \b, \
B, depe
ndent on the Unicode locale.
U UNICODE Make \
w,
\W, \b, \
B, depe
ndent on the Unicode locale.
...
...
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