fork download
  1. import re
  2. description = "Tracks\n======\n0:00 Tonebox - Frozen Code\n6:00 SHIKIMO & DOOMROAR - Getaway\n9:30 d.notive - Streets of Passion\n14:55 Perturbator - Neo Tokyo"
  3. print("This is the string:\n{}".format(description))
  4. results = re.findall(r'(?<!\d:)(?<!\d)[0-5]?\d:[0-5]\d(?!:?\d)', description)
  5. print("These are the results:\n{}".format(results))
Success #stdin #stdout 0.03s 9624KB
stdin
Standard input is empty
stdout
This is the string:
Tracks
======
0:00 Tonebox - Frozen Code
6:00 SHIKIMO & DOOMROAR - Getaway
9:30 d.notive - Streets of Passion
14:55 Perturbator - Neo Tokyo
These are the results:
['0:00', '6:00', '9:30', '14:55']