Answers for "re date python"

0

re date python

# re date validate/extract particular dd/mm/yyyy
s= 24-12-2021
l = re.compile("^(?P<date>[0-9]{2})-(?P<month>[0-9]{2})-(?P<year>[0-9]{4})$")
m = re.search(r,s)
if m:
  print(m.group("year"))
else:
  print("pattern not found")
Posted by: Guest on October-19-2021

Python Answers by Framework

Browse Popular Code Answers by Language