Skip to main content
added 244 characters in body
Source Link
Lord Yuuma
  • 597
  • 2
  • 2

Emacs Lisp, 4545 73 bytes

(lambda(s)(while(string-match".^H"s)(set's(replace-match"" nil nil s)))s)

Searches for the first occurence of anything else and ^H as long as it exists and replaces it with an empty string.

Old, incorrect version

(lambda(s)(replace-regexp-in-string".^H"""s))

Emacs Lisp, 45 bytes

(lambda(s)(replace-regexp-in-string".^H"""s))

Emacs Lisp, 45 73 bytes

(lambda(s)(while(string-match".^H"s)(set's(replace-match"" nil nil s)))s)

Searches for the first occurence of anything else and ^H as long as it exists and replaces it with an empty string.

Old, incorrect version

(lambda(s)(replace-regexp-in-string".^H"""s))
Source Link
Lord Yuuma
  • 597
  • 2
  • 2

Emacs Lisp, 45 bytes

(lambda(s)(replace-regexp-in-string".^H"""s))