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
0a726fba
Commit
0a726fba
authored
Dec 22, 1997
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AMK's latest
parent
ccef7e19
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
Doc/lib/libre.tex
Doc/lib/libre.tex
+15
-2
Doc/libre.tex
Doc/libre.tex
+15
-2
No files found.
Doc/lib/libre.tex
View file @
0a726fba
...
...
@@ -118,6 +118,18 @@ Adding \code{?} after the qualifier makes it perform the match in
possible will be matched. Using
\code
{
.*?
}
in the previous
expression will match only
\code
{
<H1>
}
.
%
\item
[\code{\{\var{m},\var{n}\}}]
Causes the resulting RE to match from
\var
{
m
}
to
\var
{
n
}
repetitions of the preceding RE, attempting to
match as many repetitions as possible. For example,
\code
{
a
\{
3,5
\}
}
will match from 3 to 5 'a' characters.
%
\item
[\code{\{\var{m},\var{n}\}?}]
Causes the resulting RE to
match from
\var
{
m
}
to
\var
{
n
}
repetitions of the preceding RE,
attempting to match as
\emph
{
few
}
repetitions as possible. This is
the non-greedy version of the previous qualifier. For example, on the
6-character string 'aaaaaa',
\code
{
a
\{
3,5
\}
}
will match 5 'a'
characters, while
\code
{
a
\{
3,5
\}
?
}
will only match 3 characters.
%
\item
[\code{\e}]
Either escapes special characters (permitting you to match
characters like '*?+
\&\$
'), or signals a special sequence; special
sequences are discussed below.
...
...
@@ -346,14 +358,15 @@ expression will be used several times in a single program.
\begin{funcdesc}
{
match
}{
pattern
\,
string
\optional
{
\,
flags
}}
If zero or more characters at the beginning of
\var
{
string
}
match
the regular expression
\var
{
pattern
}
, return a corresponding
\code
{
Match
}
object
. Return
\code
{
None
}
if the string does not
\code
{
Match
Object
}
instance
. Return
\code
{
None
}
if the string does not
match the pattern; note that this is different from a zero-length
match.
\end{funcdesc}
\begin{funcdesc}
{
search
}{
pattern
\,
string
\optional
{
\,
flags
}}
Scan through
\var
{
string
}
looking for a location where the regular
expression
\var
{
pattern
}
produces a match. Return
\code
{
None
}
if no
expression
\var
{
pattern
}
produces a match, and return a corresponding
\code
{
MatchObject
}
instance.
Return
\code
{
None
}
if no
position in the string matches the pattern; note that this is
different from finding a zero-length match at some point in the string.
\end{funcdesc}
...
...
Doc/libre.tex
View file @
0a726fba
...
...
@@ -118,6 +118,18 @@ Adding \code{?} after the qualifier makes it perform the match in
possible will be matched. Using
\code
{
.*?
}
in the previous
expression will match only
\code
{
<H1>
}
.
%
\item
[\code{\{\var{m},\var{n}\}}]
Causes the resulting RE to match from
\var
{
m
}
to
\var
{
n
}
repetitions of the preceding RE, attempting to
match as many repetitions as possible. For example,
\code
{
a
\{
3,5
\}
}
will match from 3 to 5 'a' characters.
%
\item
[\code{\{\var{m},\var{n}\}?}]
Causes the resulting RE to
match from
\var
{
m
}
to
\var
{
n
}
repetitions of the preceding RE,
attempting to match as
\emph
{
few
}
repetitions as possible. This is
the non-greedy version of the previous qualifier. For example, on the
6-character string 'aaaaaa',
\code
{
a
\{
3,5
\}
}
will match 5 'a'
characters, while
\code
{
a
\{
3,5
\}
?
}
will only match 3 characters.
%
\item
[\code{\e}]
Either escapes special characters (permitting you to match
characters like '*?+
\&\$
'), or signals a special sequence; special
sequences are discussed below.
...
...
@@ -346,14 +358,15 @@ expression will be used several times in a single program.
\begin{funcdesc}
{
match
}{
pattern
\,
string
\optional
{
\,
flags
}}
If zero or more characters at the beginning of
\var
{
string
}
match
the regular expression
\var
{
pattern
}
, return a corresponding
\code
{
Match
}
object
. Return
\code
{
None
}
if the string does not
\code
{
Match
Object
}
instance
. Return
\code
{
None
}
if the string does not
match the pattern; note that this is different from a zero-length
match.
\end{funcdesc}
\begin{funcdesc}
{
search
}{
pattern
\,
string
\optional
{
\,
flags
}}
Scan through
\var
{
string
}
looking for a location where the regular
expression
\var
{
pattern
}
produces a match. Return
\code
{
None
}
if no
expression
\var
{
pattern
}
produces a match, and return a corresponding
\code
{
MatchObject
}
instance.
Return
\code
{
None
}
if no
position in the string matches the pattern; note that this is
different from finding a zero-length match at some point in the string.
\end{funcdesc}
...
...
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