fork(2) download
  1. import re
  2. pattern = re.compile('^(\d{2})_|_(\d{2})')
  3. m = pattern.search('12_text')
  4. finddupe = ""
  5. if m:
  6. finddupe = f"{m.group(1) or ''}{m.group(2) or ''}"
  7. print(finddupe)
Success #stdin #stdout 0.02s 9524KB
stdin
Standard input is empty
stdout
12