[EMAIL PROTECTED] wrote: > got zero results on this one :) Really?
>>> s = '''<tag1 name="john"/> <br/> <tag2 value="adj__tall__"/> <tag1 name="joe"/> <tag1 name="jack"/> <tag2 value="adj__short__"/>''' >>> pat = re.compile('tag1.+?name="(.+?)".*?(?:<)(?=tag2).*?="adj__(.*?)__', >>> re.DOTALL) >>> m = re.findall(pat, s) >>> m [('john', 'tall'), ('joe', 'short')] Regards, Rob -- http://mail.python.org/mailman/listinfo/python-list