fork(1) download
  1. import re
  2. s = "Helllo\b\bo world"
  3. r = re.compile("^\b+|[^\b]\b")
  4. while r.search(s):
  5. s = r.sub("", s)
  6. print(s)
  7.  
Success #stdin #stdout 0s 9024KB
stdin
Standard input is empty
stdout
Hello world