fork(1) download
  1. import re
  2. rx = r"\d{1,31}(?::? |[-/])\d{1,12}(?::? |[-/])\d{4}"
  3. s = "My name is ALi Date is 09/03/2018"
  4. m = re.search(rx, s)
  5. if m:
  6. print("{} : DATESTR".format(m.group()))
  7.  
Success #stdin #stdout 0.02s 7016KB
stdin
Standard input is empty
stdout
09/03/2018 : DATESTR