[issue29315] \b requires raw strings or to be escaped. Update docs with that hint?

2017-01-18 Thread R. David Murray
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

[issue29315] \b requires raw strings or to be escaped. Update docs with that hint?

2017-01-18 Thread Mike Lissner
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