Regular Expression question
looping
kadeko at gmail.com
Thu Oct 25 03:54:07 EDT 2007
More information about the Python-list mailing list
Thu Oct 25 03:54:07 EDT 2007
- Previous message (by thread): Regular Expression question
- Next message (by thread): local variable referenced before assignment
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Oct 25, 9:25 am, Peter Otten <__pete... at web.de> wrote: > > You want a "negative lookahead assertion" then: > Now I feel dumb... I've seen the (?!...) dozen times in the doc but never figure out that it is what I'm looking for. So this one is the winner: s = re.search(r'create\s+or\s+replace\s+package\s+(?!body\s+)', txt, re.IGNORECASE) Thanks Peter and Marc.
- Previous message (by thread): Regular Expression question
- Next message (by thread): local variable referenced before assignment
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list