regex line by line over file

Chris Angelico rosuav at gmail.com
Wed Mar 26 23:42:39 EDT 2014


On Thu, Mar 27, 2014 at 2:23 PM, James Smith <bjlockie at lockie.ca> wrote:
> re.M
> p = re.compile('^\s*\"SHELF-.*,SC,.*,:\\\"Log Collection In Progress\\\"')

If you're expecting this to be parsed as a multiline regex, it won't
be. Probing re.M doesn't do anything on its own; you have to pass it
as an argument to compile.

Not sure if that's your problem or not, though.

ChrisA



More information about the Python-list mailing list