Python 3 regex woes (parsing ISC DHCPD config)
davea at davea.name
Mon Jan 12 21:17:08 CET 2015
On 01/12/2015 01:20 PM, Jason Bailey wrote:
> Hi all,
What changed between 1:03 and 1:20 that made you post a nearly identical
second message, as a new thread?
> Unfortunately, I get no matches. From output on the command line, I can
> see that Python is adding extra backslashes to my re.compile string. I
> have added the raw 'r' in front of the strings to prevent it, but to no
What makes you think that? Please isolate this part of your problem
with a simple short program, so we can diagnose it. You're probably
getting confused between str() and repr(). The latter adds backslash
escape sequences for good reason, and if you don't understand it, you
might think the strings are getting corrupted.
More information about the Python-list