Avoid using replace-regexp from lisp code

See #2