diff options
Diffstat (limited to 'Doc/library/re.rst')
-rw-r--r-- | Doc/library/re.rst | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst index b196a28..d3d97c0 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -699,9 +699,12 @@ form. .. function:: escape(string) - Return *string* with all non-alphanumerics backslashed; this is useful if you - want to match an arbitrary literal string that may have regular expression - metacharacters in it. + Escape all the characters in pattern except ASCII letters, numbers and ``'_'``. + This is useful if you want to match an arbitrary literal string that may + have regular expression metacharacters in it. + + .. versionchanged:: 3.3 + The ``'_'`` character is no longer escaped. .. function:: purge() |