import re text = "The event starts at 10:30 today" match = re.search(r"\d\d:\d\d", text) if match: print("Found a time:", match.group()) else: print("No time found")
Click Run to execute this code.