Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #83626

Re: Python 3 regex woes (parsing ISC DHCPD config)

Date 2015-01-12 15:17 -0500
From Dave Angel <davea@davea.name>
Subject Re: Python 3 regex woes (parsing ISC DHCPD config)
References <54B41073.30902@emerytelcom.com>
Newsgroups comp.lang.python
Message-ID <mailman.17636.1421093841.18130.python-list@python.org> (permalink)

Show all headers | View raw


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
> avail.
>

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.


-- 
DaveA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Python 3 regex woes (parsing ISC DHCPD config) Dave Angel <davea@davea.name> - 2015-01-12 15:17 -0500

csiph-web