import retext="id11= 1.2e+03"reg=re.compile(r"\b(id11)[ \t]*=[ \t]*(\S+)")match=reg.search(text)print("%s %s"%(match.group(1),match.group(2)))