Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- text = input()
- matches = re.finditer('\\b(?P<day>\\d{2})([-./])(?P<month>[A-Z][a-z]{2})\\2(?P<year>\\d{4})\\b', text)
- for match in matches:
- print(f"Day: {match.group('day')}, Month: {match.group('month')}, Year: {match.group('year')}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement