fork download
  1. import re
  2.  
  3. input = "Hola B2B 234234 2.2.2 Amigo"
  4. cleaned = re.sub(r"(^| )\d[.\d]*\b", "", input)
  5. print('"' + cleaned + '"')
  6.  
Success #stdin #stdout 0.03s 9668KB
stdin
Standard input is empty
stdout
"Hola B2B Amigo"