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, Christoph