Deprecated replacement for emacs regex
1 answer
Yes, see function replace-regexp-in-string
. Just like this.
And to replace the corresponding text in the buffer you have replace-regexp
.
The replacement does not need to be a literal string, but can involve extracting portions of the match from regular expressions and other manipulations. Use C-h f
to see the document for these functions.
+2
source to share