Replace any character with a fixed char(make-string (length word) 0) replace-regexp-in-stringEmacs21 already has what you need: (replace-regexp-in-string "fo+" "baz" "da foo is foobared") => "da baz is bazbared" Direddired.el already has what you need: (require 'dired) (dired-replace-in-string "fo+" "baz" "da foo is foobared") => "da baz is bazbared" Splitting and Joining StringsYou can use the re