Hi all, I am trying to avoid matching of the terms that start with a word ABC_ The general pattern is that the term has only caps alphabets and _, I have to ignore from these terms, ones that begin in ABC_ The regular expression I have written is:
pattern = re.compile( ' ((?<!ABC_)([A-Z_]+) )' ) m = pattern.search("ABC_PB_GH_ABH") m.group(0) should return empty string.. but that is not the case what it returns is ABC_PB_GH_ABH I don't understand why this is happening.. I have used this kind of lookbehind operation earlier and it worked fine.. Any idea??? -- Smiles Neha ))))) _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers