Bastien <bast...@xxx.fr> writes:If you are using Emacs CVS (which your headers indicate), the
> I often come across this problem: how to swap two strings in a buffer?
> For instance, say that you want to exchange #000 and #FFF in an HTML
> page: all #000 should become #FFF and all #FFF should become #000.
> How to do this with one *single* function ?
following should do the trick:
C-M-% #\(\(000\)\|FFF\) RET \,(if &2 "FFF" "000") RET
If you want to know how to do this non-interactively, type
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.