@@ -24,27 +24,6 @@ \section{Built-in Module \sectcode{re}}
2424\code {"\e n"} is a one-character string containing a newline. Usually
2525patterns will be expressed in Python code using this raw string notation.
2626
27- % XXX Can the following section be dropped, or should it be boiled down?
28-
29- % \strong{Please note:} There is a little-known fact about Python string
30- % literals which means that you don't usually have to worry about
31- % doubling backslashes, even though they are used to escape special
32- % characters in string literals as well as in regular expressions. This
33- % is because Python doesn't remove backslashes from string literals if
34- % they are followed by an unrecognized escape character.
35- % \emph{However}, if you want to include a literal \dfn{backslash} in a
36- % regular expression represented as a string literal, you have to
37- % \emph{quadruple} it or enclose it in a singleton character class.
38- % E.g.\ to extract \LaTeX\ \code{\e section\{{\rm
39- % \ldots}\}} headers from a document, you can use this pattern:
40- % \code{'[\e ] section\{\e (.*\e )\}'}. \emph{Another exception:}
41- % the escape sequence \code{\e b} is significant in string literals
42- % (where it means the ASCII bell character) as well as in Emacs regular
43- % expressions (where it stands for a word boundary), so in order to
44- % search for a word boundary, you should use the pattern \code{'\e \e b'}.
45- % Similarly, a backslash followed by a digit 0-7 should be doubled to
46- % avoid interpretation as an octal escape.
47-
4827\subsection {Regular Expression Syntax }
4928
5029A regular expression (or RE) specifies a set of strings that matches
0 commit comments