bpo-32614: Modify re examples to use a raw string to prevent warning (GH-5265)

Modify RE examples in documentation to use raw strings to prevent DeprecationWarning.
Add text to REGEX HOWTO to highlight the deprecation.  Approved by Serhiy Storchaka.
This commit is contained in:
Cheryl Sabella 2018-02-02 16:16:27 -05:00 committed by Terry Jan Reedy
parent bbbcf8693b
commit 66771422d0
4 changed files with 24 additions and 6 deletions

View file

@ -463,7 +463,7 @@ The string in this example has the number 57 written in both Thai and
Arabic numerals::
import re
p = re.compile('\d+')
p = re.compile(r'\d+')
s = "Over \u0e55\u0e57 57 flavours"
m = p.search(s)