Regular Expression question

looping kadeko at gmail.com
Thu Oct 25 03:11:00 EDT 2007


On Oct 25, 8:49 am, Marc 'BlackJack' Rintsch <bj_... at gmx.net> wrote:
>
> needle = re.compile(r'create\s+or\s+replace\s+package(\s+body)?\s+',
>                     re.IGNORECASE)

What I want here is a RE that return ONLY the line without the "body"
keyword.
Your RE return both.
I know I could use it but I want to learn how to search something that
is NOT in the string using RE.






More information about the Python-list mailing list