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
7a90db61
Commit
7a90db61
authored
Oct 05, 2000
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document expand() method of MatchObjects
parent
1f7838bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
Doc/lib/libre.tex
Doc/lib/libre.tex
+9
-0
No files found.
Doc/lib/libre.tex
View file @
7a90db61
...
...
@@ -597,6 +597,15 @@ The pattern string from which the regex object was compiled.
\class
{
MatchObject
}
instances support the following methods and attributes:
\begin{methoddesc}
[MatchObject]
{
expand
}{
template
}
Return the string obtained by doing backslash substitution on the
template string
\var
{
template
}
, as done by the
\method
{
sub()
}
method.
Escapes such as
\samp
{
\e
n
}
are converted to the appropriate
characters, and numeric backreferences (
\samp
{
\e
1
}
,
\samp
{
\e
2
}
) and named
backreferences (
\samp
{
\e
g<1>
}
,
\samp
{
\e
g<name>
}
) are replaced by the contents of the
corresponding group.
\end{methoddesc}
\begin{methoddesc}
[MatchObject]
{
group
}{
\optional
{
group1,
\moreargs
}}
Returns one or more subgroups of the match. If there is a single
argument, the result is a single string; if there are
...
...
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