fork download
  1. import re
  2. dateregex = re.compile(r'\w\w.\w\w.\w\w\w\w')
  3. mo = dateregex.search('today is 05.10.2021 and Tuesday')
  4. print(mo.group())
  5.  
  6. dateregex2 = re.compile(r'\d\d.\d\d.\d\d\d\d')
  7. mo2 = dateregex2.search('today is 05.10.2021 and Tuesday')
  8. print(mo2.group())
Success #stdin #stdout 0.02s 9364KB
stdin
Standard input is empty
stdout
05.10.2021
05.10.2021