fork download
  1. import re
  2. pattern = r'(?<!\d)\d{1,2}([.:/ -])(?:\d{1,2}|\w{3,})\1\d{4}(?!\d)'
  3. text = 'Aaaa 12-23-2019, bddd 29 10 2019 <=== 1:2:2018'
  4. results = [x.group() for x in re.finditer(pattern, text)]
  5. print(results)
Success #stdin #stdout 0.02s 9580KB
stdin
Standard input is empty
stdout
['12-23-2019', '29 10 2019', '1:2:2018']