@@ -857,17 +857,17 @@ \subsection{Examples}
857857\code {maximum recursion limit exceeded}. For example,
858858
859859\begin {verbatim }
860- >>> s = "<" + "that's a very big string!"*1000 + ">"
861- >>> re.match('<.*?>', s)
862- Traceback (most recent call last):
863- File "<stdin>", line 1, in ?
864- File "/usr/local/lib/python2.3/sre.py", line 132, in match
865- return _compile(pattern, flags).match(string)
866- RuntimeError: maximum recursion limit exceeded
860+ >>> s = "<" + "that's a very big string!"*1000 + ">"
861+ >>> re.match('<.*?>', s)
862+ Traceback (most recent call last):
863+ File "<stdin>", line 1, in ?
864+ File "/usr/local/lib/python2.3/sre.py", line 132, in match
865+ return _compile(pattern, flags).match(string)
866+ RuntimeError: maximum recursion limit exceeded
867867\end {verbatim }
868868
869869You can often restructure your regular expression to avoid backtracking.
870- The above regular expression can be recast as \regexp { \textless
871- [\textasciicircum \textgreater ]*\textgreater }. As a further
872- benefit, such regular expressions will run faster than their backtracking
873- equivalents.
870+ The above regular expression can be recast as
871+ \regexp { \textless [\textasciicircum \textgreater ]*\textgreater }. As a
872+ further benefit, such regular expressions will run faster than their
873+ backtracking equivalents.
0 commit comments