fork download
  1. import re
  2. s = "CLOSED ORD NO 2007-24"
  3. print( re.sub(r"(\d+-\d+)|.", r'\1', s, flags=re.S) )
Success #stdin #stdout 0.02s 9560KB
stdin
Standard input is empty
stdout
2007-24