import re m = re.search('<a href=([^"]*)".*?>','awlkdjk<a href="www.test.de"awdilj>adawd"',) print(m.group(0))
Standard input is empty
<a href="www.test.de"awdilj>
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!