diff options
author | Fred Drake <fdrake@acm.org> | 1996-12-13 22:04:31 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1996-12-13 22:04:31 (GMT) |
commit | 4b3f0312c9358a3a05b75aaab72aeee1ac869101 (patch) | |
tree | 6720366f64c003a46b4c0a053c1ccfebcebd00ad /Doc/lib/libregex.tex | |
parent | 6dc2aae3cd85f9a11f823df9742e6283b1f406f6 (diff) | |
download | cpython-4b3f0312c9358a3a05b75aaab72aeee1ac869101.zip cpython-4b3f0312c9358a3a05b75aaab72aeee1ac869101.tar.gz cpython-4b3f0312c9358a3a05b75aaab72aeee1ac869101.tar.bz2 |
(lib<all sorts of stuff>.tex):
Merged in many typo corrections and fixes to support GNU info
processing; submitted by Tamito Kajiyama.
Diffstat (limited to 'Doc/lib/libregex.tex')
-rw-r--r-- | Doc/lib/libregex.tex | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/Doc/lib/libregex.tex b/Doc/lib/libregex.tex index f2e094a..91f3a03 100644 --- a/Doc/lib/libregex.tex +++ b/Doc/lib/libregex.tex @@ -67,11 +67,11 @@ affect how the regular expressions around them are interpreted. The special characters are: \begin{itemize} -\item[\code{.}]{(Dot.) Matches any character except a newline.} -\item[\code{\^}]{(Caret.) Matches the start of the string.} -\item[\code{\$}]{Matches the end of the string. +\item[\code{.}] (Dot.) Matches any character except a newline. +\item[\code{\^}] (Caret.) Matches the start of the string. +\item[\code{\$}] Matches the end of the string. \code{foo} matches both 'foo' and 'foobar', while the regular -expression '\code{foo\$}' matches only 'foo'.} +expression '\code{foo\$}' matches only 'foo'. \item[\code{*}] Causes the resulting RE to match 0 or more repetitions of the preceding RE. \code{ab*} will match 'a', 'ab', or 'a' followed by any number of 'b's. @@ -119,48 +119,48 @@ should be doubled are indicated. creates a regular expression that will match either A or B. This can be used inside groups (see below) as well. % -\item[\code{\e( \e)}]{Indicates the start and end of a group; the +\item[\code{\e( \e)}] Indicates the start and end of a group; the contents of a group can be matched later in the string with the -\code{\e \[1-9]} special sequence, described next.} +\code{\e [1-9]} special sequence, described next. % {\fulllineitems\item[\code{\e \e 1, ... \e \e 7, \e 8, \e 9}] -{Matches the contents of the group of the same +Matches the contents of the group of the same number. For example, \code{\e (.+\e ) \e \e 1} matches 'the the' or '55 55', but not 'the end' (note the space after the group). This special sequence can only be used to match one of the first 9 groups; groups with higher numbers can be matched using the \code{\e v} sequence. (\code{\e 8} and \code{\e 9} don't need a double backslash -because they are not octal digits.)}} +because they are not octal digits.)} % -\item[\code{\e \e b}]{Matches the empty string, but only at the +\item[\code{\e \e b}] Matches the empty string, but only at the beginning or end of a word. A word is defined as a sequence of alphanumeric characters, so the end of a word is indicated by -whitespace or a non-alphanumeric character.} +whitespace or a non-alphanumeric character. % -\item[\code{\e B}]{Matches the empty string, but when it is \emph{not} at the -beginning or end of a word.} +\item[\code{\e B}] Matches the empty string, but when it is \emph{not} at the +beginning or end of a word. % -\item[\code{\e v}]{Must be followed by a two digit decimal number, and -matches the contents of the group of the same number. The group number must be between 1 and 99, inclusive.} +\item[\code{\e v}] Must be followed by a two digit decimal number, and +matches the contents of the group of the same number. The group number must be between 1 and 99, inclusive. % \item[\code{\e w}]Matches any alphanumeric character; this is equivalent to the set \code{[a-zA-Z0-9]}. % -\item[\code{\e W}]{Matches any non-alphanumeric character; this is -equivalent to the set \code{[\^a-zA-Z0-9]}.} -\item[\code{\e <}]{Matches the empty string, but only at the beginning of a +\item[\code{\e W}] Matches any non-alphanumeric character; this is +equivalent to the set \code{[\^a-zA-Z0-9]}. +\item[\code{\e <}] Matches the empty string, but only at the beginning of a word. A word is defined as a sequence of alphanumeric characters, so the end of a word is indicated by whitespace or a non-alphanumeric -character.} -\item[\code{\e >}]{Matches the empty string, but only at the end of a -word.} +character. +\item[\code{\e >}] Matches the empty string, but only at the end of a +word. -\item[\code{\e \e \e \e}]{Matches a literal backslash.} +\item[\code{\e \e \e \e}] Matches a literal backslash. % In Emacs, the following two are start of buffer/end of buffer. In % Python they seem to be synonyms for ^$. -\item[\code{\e `}]{Like \code{\^}, this only matches at the start of the -string.} +\item[\code{\e `}] Like \code{\^}, this only matches at the start of the +string. \item[\code{\e \e '}] Like \code{\$}, this only matches at the end of the string. % end of buffer |