fork download
  1. import re
  2. text = "system:microsoft flow:to_server vho:file-was-closed heur250:unknown.file, file.png:word, 03:00, file:123, mailto:user, cid:image003.png"
  3. pattern = r'\bmailto:[\w.-]+|\b\d+:[\w.-]+|[\w.-]+:\d+|[\w.-]+:[\w.-]*\.(?:jpg|png)(?![\w.-])|[\w.-]*\.(?:jpg|png):[\w.-]+|([\w.-]+:[\w.-]+)'
  4. print( [x for x in re.findall(pattern, text) if x!=''] )
Success #stdin #stdout 0.03s 9584KB
stdin
Standard input is empty
stdout
['system:microsoft', 'flow:to_server', 'vho:file-was-closed', 'heur250:unknown.file']