diff options
author | Raymond Hettinger <python@rcn.com> | 2003-09-10 18:45:12 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-09-10 18:45:12 (GMT) |
commit | 5bcc933211a880d17341082644122c75e29e17c2 (patch) | |
tree | 0b03279e1257c1fe47668b704f478c179cd84031 /Doc | |
parent | 4997a69fe48f364c7c5d08f29f337ccd62da0562 (diff) | |
download | cpython-5bcc933211a880d17341082644122c75e29e17c2.zip cpython-5bcc933211a880d17341082644122c75e29e17c2.tar.gz cpython-5bcc933211a880d17341082644122c75e29e17c2.tar.bz2 |
SF bug #803842: Wrong description of regexp concatenation
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libre.tex | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/lib/libre.tex b/Doc/lib/libre.tex index 1aaebd9..7368ab4 100644 --- a/Doc/lib/libre.tex +++ b/Doc/lib/libre.tex @@ -51,10 +51,11 @@ matches a particular string, which comes down to the same thing). Regular expressions can be concatenated to form new regular expressions; if \emph{A} and \emph{B} are both regular expressions, -then \emph{AB} is also a regular expression. If a string \emph{p} -matches A and another string \emph{q} matches B, the string \emph{pq} -will match AB if \emph{A} and \emph{B} do no specify boundary -conditions that are no longer satisfied by \emph{pq}. Thus, complex +then \emph{AB} is also a regular expression. In general, if a string +\emph{p} matches \emph{A} and another string \emph{q} matches \emph{B}, +the string \emph{pq} will match AB. This holds unless \emph{A} or +\emph{B} contain low precedence operations; boundary conditions between +\emph{A} and \emph{B}; or have numbered group references. Thus, complex expressions can easily be constructed from simpler primitive expressions like the ones described here. For details of the theory and implementation of regular expressions, consult the Friedl book |