R. David Murray added the comment:
One should always use raw strings for regex expressions, and this is already
documented in the introduction to the regex module. Further, in 3.5 using \ in
front of characters that aren't special produces a warning, which should reduce
the frequency of this
New submission from Mike Lissner:
I just ran into a funny corner case I imagine others are aware of. When you
write "\b" in Python, it is a single character: "\x08". So if you try to write
a regex like:
words = '\b(.*)\b'
That won't work. But using a raw string will:
words = r'\b(.*)\b'
As