On Oct 25, 9:25 am, Peter Otten <[EMAIL PROTECTED]> 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.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to