fork(1) download
  1. import re
  2. s = 'What? The Census Says It’s Counted 99.9 Percent of Households. Don’t Be Fooled.'
  3. print(re.sub(r'[^ 0-9a-zA-Z](?!(?<=\d\.)\d)', '', s))
  4. print(re.sub(r'(?:_|[^\s\w])(?!(?<=\d\.)\d)', '', s))
Success #stdin #stdout 0.02s 9420KB
stdin
Standard input is empty
stdout
What The Census Says Its Counted 99.9 Percent of Households Dont Be Fooled
What The Census Says Its Counted 99.9 Percent of Households Dont Be Fooled