fork download
  1. import re
  2. text = "Here are my favorite things: crypto.com, polo.com, cryp.com and google.com"
  3. print( re.sub(r'\s*\b(?!crypto\.)\w+\.com\b', '', text) )
Success #stdin #stdout 0.02s 9484KB
stdin
Standard input is empty
stdout
Here are my favorite things: crypto.com,, and