diff options
author | Gustavo Niemeyer <gustavo@niemeyer.net> | 2003-10-17 22:13:16 (GMT) |
---|---|---|
committer | Gustavo Niemeyer <gustavo@niemeyer.net> | 2003-10-17 22:13:16 (GMT) |
commit | ad3fc44ccb40f2ad33c0d09f5a2dfbd4feb442eb (patch) | |
tree | 929ea71dea18a5ee0c5c862bbb39d37b693209ad /Doc/lib/libre.tex | |
parent | 41e2809febd6e09a34adf21beb6d2ae2360fdc46 (diff) | |
download | cpython-ad3fc44ccb40f2ad33c0d09f5a2dfbd4feb442eb.zip cpython-ad3fc44ccb40f2ad33c0d09f5a2dfbd4feb442eb.tar.gz cpython-ad3fc44ccb40f2ad33c0d09f5a2dfbd4feb442eb.tar.bz2 |
Implemented non-recursive SRE matching.
Diffstat (limited to 'Doc/lib/libre.tex')
-rw-r--r-- | Doc/lib/libre.tex | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/lib/libre.tex b/Doc/lib/libre.tex index 7368ab4..b6818a9 100644 --- a/Doc/lib/libre.tex +++ b/Doc/lib/libre.tex @@ -297,6 +297,15 @@ assertions, the contained pattern must only match strings of some fixed length. Patterns which start with negative lookbehind assertions may match at the beginning of the string being searched. +\item[\code{(?(\var{id/name})yes-pattern|no-pattern)}] Will try to match +with \regexp{yes-pattern} if the group with given \var{id} or \var{name} +exists, and with \regexp{no-pattern} if it doesn't. \regexp{|no-pattern} +is optional and can be omitted. For example, +\regexp{(<)?(\e w+@\e w+(?:\e .\e w+)+)(?(1)>)} is a poor email matching +pattern, which will match with \code{'<user@host.com>'} as well as +\code{'user@host.com'}, but not with \code{'<user@host.com'}. +\versionadded{2.3} + \end{list} The special sequences consist of \character{\e} and a character from the |