Advertisement
go6odn28

regex_match

Mar 16th, 2024
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. import re
  2. pattern = r'\b(?P<Day>[0-9]{2})([./-])(?P<Month>[A-Z][a-z]{2})\2(?P<Year>[0-9]{4})\2(?P=Day)'
  3. match = re.search(pattern,"23.May.1989.23")
  4. print(match)
  5.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement