John Salerno wrote: > But would findall return this match: aMNHiRFLoDLFb ?? > > There are actually two matches there, but they overlap. So how would > your write an RE that catches them both?
I remembered the 'non-consuming' match (?+...) and a miniute of experimentation gave the following. >>> import re >>> s ="aMNHiRFLoDLFb" >>> re.findall(r'[A-Z]{3}([a-z])(?=[A-Z]{3})', s) ['i', 'o'] >>> - Paddy. -- http://mail.python.org/mailman/listinfo/python-list