all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs regexp/incrementer question
@ 2003-01-16 11:15 Tim Morley (remove vegetable for email address)
  2003-01-16 12:17 ` Friedrich Dominicus
  2003-01-16 14:49 ` Peter Boettcher
  0 siblings, 2 replies; 7+ messages in thread
From: Tim Morley (remove vegetable for email address) @ 2003-01-16 11:15 UTC (permalink / raw)


Hi all.

Does anybody know of a way to include an incrementing number in a regexp
search-and-replace in Emacs? What I want to do is search for a regexp, and
the first time I find it, replace it with "case 1", the second time replace
it with "case 2", etc.

Even if the solution is a several-stager, I'd be more than happy, because
I'm currently having to replace each occurrence with "case xxx" and then
change each "xxx" to a number by hand afterwards -- hardly ideal. I could
use awk or something to change the xxx's to incrementing numbers, but I'd
much prefer to do it all in Emacs if I can.

Thanks in advance for your help.


Tim Morley

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-01-17 14:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-16 11:15 Emacs regexp/incrementer question Tim Morley (remove vegetable for email address)
2003-01-16 12:17 ` Friedrich Dominicus
2003-01-17  9:01   ` Tim Morley (remove vegetable for email address)
2003-01-17 12:59     ` Friedrich Dominicus
2003-01-17 13:44       ` Christopher J. White
2003-01-17 14:12       ` Tim Morley (remove vegetable for email address)
2003-01-16 14:49 ` Peter Boettcher

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.