mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
Turn the table for flags into a nested itemized environment.
This commit is contained in:
parent
c525e43b42
commit
a42c17851c
2 changed files with 48 additions and 42 deletions
|
|
@ -271,36 +271,39 @@ The module defines the following functions and constants, and an exception:
|
||||||
\var{flags} value. Values can be any of the following variables,
|
\var{flags} value. Values can be any of the following variables,
|
||||||
combined using bitwise OR (the \code{|} operator).
|
combined using bitwise OR (the \code{|} operator).
|
||||||
|
|
||||||
\begin{tableii}{|l|l|}{code}{Flag}{Meaning}
|
\begin{itemize}
|
||||||
|
|
||||||
\lineii{I or IGNORECASE}{Perform case-insensitive matching;
|
\item[I ] or IGNORECASE:
|
||||||
expressions like [A-Z] will match lowercase letters, too.}
|
Perform case-insensitive matching; expressions like [A-Z] will match
|
||||||
|
lowercase letters, too.
|
||||||
|
|
||||||
\lineii{L or LOCALE}{Make \code{\e w}, \code{\e W}, \code{\e b},
|
\item[L ] or LOCALE:
|
||||||
\code{\e B}, dependent on the current locale.
|
Make \code{\e w}, \code{\e W}, \code{\e b}, \code{\e B}, dependent on
|
||||||
}
|
the current locale.
|
||||||
|
|
||||||
|
\item[M ] or MULTILINE:
|
||||||
|
When specified, the pattern character \code{\^} matches at the
|
||||||
|
beginning of the string and at the beginning of each line (immediately
|
||||||
|
following each newline); and the pattern character \code{\$} matches
|
||||||
|
at the end of the string and at the end of each line (immediately
|
||||||
|
preceding each newline).
|
||||||
|
|
||||||
\lineii{M or MULTILINE}{When specified, the pattern character \code{\^}
|
|
||||||
matches at the beginning of the string and at the beginning of each
|
|
||||||
line (immediately following each newline); and the pattern character
|
|
||||||
\code{\$} matches at the end of the string and at the end of each line
|
|
||||||
(immediately preceding each newline).
|
|
||||||
By default, \code{\^} matches only at the beginning of the string, and
|
By default, \code{\^} matches only at the beginning of the string, and
|
||||||
\code{\$} only at the end of the string and immediately before the
|
\code{\$} only at the end of the string and immediately before the
|
||||||
newline (if any) at the end of the string.
|
newline (if any) at the end of the string.
|
||||||
}
|
|
||||||
|
|
||||||
\lineii{S or DOTALL}{Make the \code{.} special character match a newline; without this flag, \code{.} will match anything \emph{except} a newline.}
|
\item[S ] or DOTALL:
|
||||||
|
Make the \code{.} special character match a newline; without this
|
||||||
|
flag, \code{.} will match anything \emph{except} a newline.
|
||||||
|
|
||||||
\lineii{X or VERBOSE}{When specified, whitespace within the pattern
|
\item[X ] or VERBOSE:
|
||||||
string is ignored except when in a character class or preceded by an
|
When specified, whitespace within the pattern string is ignored except
|
||||||
unescaped backslash, and, when a line contains a \code{\#} not in a
|
when in a character class or preceded by an unescaped backslash, and,
|
||||||
character class or preceded by an unescaped backslash, all characters
|
when a line contains a \code{\#} not in a character class or preceded
|
||||||
from the leftmost such \code{\#} through the end of the line are
|
by an unescaped backslash, all characters from the leftmost such
|
||||||
ignored.
|
\code{\#} through the end of the line are ignored.
|
||||||
}
|
|
||||||
|
|
||||||
\end{tableii}
|
\end{itemize}
|
||||||
|
|
||||||
The sequence
|
The sequence
|
||||||
%
|
%
|
||||||
|
|
|
||||||
|
|
@ -271,36 +271,39 @@ The module defines the following functions and constants, and an exception:
|
||||||
\var{flags} value. Values can be any of the following variables,
|
\var{flags} value. Values can be any of the following variables,
|
||||||
combined using bitwise OR (the \code{|} operator).
|
combined using bitwise OR (the \code{|} operator).
|
||||||
|
|
||||||
\begin{tableii}{|l|l|}{code}{Flag}{Meaning}
|
\begin{itemize}
|
||||||
|
|
||||||
\lineii{I or IGNORECASE}{Perform case-insensitive matching;
|
\item[I ] or IGNORECASE:
|
||||||
expressions like [A-Z] will match lowercase letters, too.}
|
Perform case-insensitive matching; expressions like [A-Z] will match
|
||||||
|
lowercase letters, too.
|
||||||
|
|
||||||
\lineii{L or LOCALE}{Make \code{\e w}, \code{\e W}, \code{\e b},
|
\item[L ] or LOCALE:
|
||||||
\code{\e B}, dependent on the current locale.
|
Make \code{\e w}, \code{\e W}, \code{\e b}, \code{\e B}, dependent on
|
||||||
}
|
the current locale.
|
||||||
|
|
||||||
|
\item[M ] or MULTILINE:
|
||||||
|
When specified, the pattern character \code{\^} matches at the
|
||||||
|
beginning of the string and at the beginning of each line (immediately
|
||||||
|
following each newline); and the pattern character \code{\$} matches
|
||||||
|
at the end of the string and at the end of each line (immediately
|
||||||
|
preceding each newline).
|
||||||
|
|
||||||
\lineii{M or MULTILINE}{When specified, the pattern character \code{\^}
|
|
||||||
matches at the beginning of the string and at the beginning of each
|
|
||||||
line (immediately following each newline); and the pattern character
|
|
||||||
\code{\$} matches at the end of the string and at the end of each line
|
|
||||||
(immediately preceding each newline).
|
|
||||||
By default, \code{\^} matches only at the beginning of the string, and
|
By default, \code{\^} matches only at the beginning of the string, and
|
||||||
\code{\$} only at the end of the string and immediately before the
|
\code{\$} only at the end of the string and immediately before the
|
||||||
newline (if any) at the end of the string.
|
newline (if any) at the end of the string.
|
||||||
}
|
|
||||||
|
|
||||||
\lineii{S or DOTALL}{Make the \code{.} special character match a newline; without this flag, \code{.} will match anything \emph{except} a newline.}
|
\item[S ] or DOTALL:
|
||||||
|
Make the \code{.} special character match a newline; without this
|
||||||
|
flag, \code{.} will match anything \emph{except} a newline.
|
||||||
|
|
||||||
\lineii{X or VERBOSE}{When specified, whitespace within the pattern
|
\item[X ] or VERBOSE:
|
||||||
string is ignored except when in a character class or preceded by an
|
When specified, whitespace within the pattern string is ignored except
|
||||||
unescaped backslash, and, when a line contains a \code{\#} not in a
|
when in a character class or preceded by an unescaped backslash, and,
|
||||||
character class or preceded by an unescaped backslash, all characters
|
when a line contains a \code{\#} not in a character class or preceded
|
||||||
from the leftmost such \code{\#} through the end of the line are
|
by an unescaped backslash, all characters from the leftmost such
|
||||||
ignored.
|
\code{\#} through the end of the line are ignored.
|
||||||
}
|
|
||||||
|
|
||||||
\end{tableii}
|
\end{itemize}
|
||||||
|
|
||||||
The sequence
|
The sequence
|
||||||
%
|
%
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue