import re text = "Email: admin@example.com" pattern = r"^Email.\s(.*@.*)" match = re.search(pattern, text) print(match.group(1))