3 ms·
I always use regexp-replace for this. There's an incrementing counter for regexp-replace, a way to manually enter a part of each replacement, and other goodies
by srcreigh 5y ago
I always use regexp-replace for this.
There's an incrementing counter for regexp-replace, a way to manually enter a part of each replacement, and other goodies.
Personally I only use capture groups, no counters or other stuff.
I do like using M-p to edit my previous failed replacement before trying again. Sometimes I use a simple replacement as a test, undo it, then edit it to add further modifications.
https://www.gnu.org/software/emacs/manual/html_node/emacs/Regexp-Replace.html https://www.gnu.org/software/emacs/manual/html_node/emacs/Re...
- FemmeAndroid 5y agoThank you so much! This is exactly what I was looking to find out. I had no idea I could trigger custom behaviors like this using regexp-replace. I’m going to need to get quick with it, but this should be enough of a reason to really work on making the switch.