re problem
Brian Quinlan
brian at sweetapp.com
Fri Jan 25 15:32:45 EST 2002
More information about the Python-list mailing list
Fri Jan 25 15:32:45 EST 2002
- Previous message (by thread): re problem
- Next message (by thread): OS X import bug? (it gets worse)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Joshua wrote:
> > self.linear = re.compile("y = [\d+?]x [+|-] \d+", re.IGNORECASE)
>
> Just a guess, but don't you either need to double your backslashes or
make
> the string a raw string?
In this case, no. \d is not a valid Python escape, so it is treated
literally. As a matter of style, the string probably should be raw.
Cheers,
Brian
- Previous message (by thread): re problem
- Next message (by thread): OS X import bug? (it gets worse)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list