diff options
Diffstat (limited to 'Doc/library/re.rst')
-rw-r--r-- | Doc/library/re.rst | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst index d5abcdd..b0b8513 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -504,7 +504,12 @@ form. character class or preceded by an unescaped backslash, all characters from the leftmost such ``'#'`` through the end of the line are ignored. - .. % XXX should add an example here + This means that the two following regular expression objects are equal:: + + re.compile(r""" [a-z]+ # some letters + \.\. # two dots + [a-z]* # perhaps more letters""") + re.compile(r"[a-z]+\.\.[a-z]*") .. function:: search(pattern, string[, flags]) |