fork(1) download
  1. import re
  2. rx = r"\b\d+/\d+/\d+.*?(?=\b\d+/\d+/\d+|$)"
  3. s = "28/11/2016 Mushroom 05/12/2016 Carrot 12/12/2016 Broccoli 19/12/2016 Potato"
  4. results = re.findall(rx, s)
  5. print(results)
Success #stdin #stdout 0.01s 9024KB
stdin
Standard input is empty
stdout
['28/11/2016 Mushroom ', '05/12/2016 Carrot ', '12/12/2016 Broccoli ', '19/12/2016 Potato']