excluding search string in regular expressions

Franz Steinhaeusler franz.steinhaeusler at utanet.at
Thu Oct 21 13:36:46 CEST 2004


Hello,

Following Problem:

find only occurances, where in the line are'::' characters and
the former line is not equal '**/'

so 2) and 3) should be found and 1) not.

1)
"""
**/
void C::B
"""

2)
"""

void C::B
"""

3)
"""
*/
void C::B
"""

I tried something
"\*\*/\n.*::"

But this is the opposite.

So my question is: how can I exclude a pattern?

single characters with [^ab] but I need not(ab)

not_this_brace_pattern(\*\*/\n).*::

thank you in advance,
-- 
Franz Steinhaeusler



More information about the Python-list mailing list