Match First Sequence in Regular Expression?

Christoph Conrad nospam at
Thu Jan 26 11:17:38 EST 2006

Hallo Alex,

>> r = re.compile("[^a]*a{3}b+(a+b*)*") matches = [s for s in
>> listOfStringsToTest if r.match(s)]

> Unfortunately, the OP's spec is even more complex than this, if we are
> to take to the letter what you just quoted; e.g. aazaaab SHOULD match,

Then it's again "a{3}b", isn't it?

Freundliche Grüße,

More information about the Python-list mailing list