import re text = "Email: test@example.com" match = re.search(r'[\w]+@[\w]+\.[\w]+', text) if match: print(match.group()) # test@example.com