unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* elisp code for replacing every other occurence in a line?
@ 2014-05-12 17:32 Frank Stutzman
  2014-05-12 17:41 ` Grant Rettke
  2014-05-12 19:22 ` Frank Stutzman
  0 siblings, 2 replies; 4+ messages in thread
From: Frank Stutzman @ 2014-05-12 17:32 UTC (permalink / raw)
  To: help-gnu-emacs

This is probably trivial for emacs-masters, but I'm not one and 
the solution is escaping me...

Say I have a buffer that have intermittant  lines that look like:

a,b,c,DD,e,f,g,DD,h
i,j,k,DD,l,m,n,DD,o

I'm trying to write some lisp code that will change them so that 
they look like:

a,b,c,DD,e,f,g,YY,h
i,j,k,DD,l,m,n,ZZ,o

DD,YY and ZZ will always be the same strings.  These pairs of lines
may not always be found sequentially in the file.  For what its worth,
this buffer is a CSV delimited buffer although I would prefer to do this 
without using any special mdoes.

-- 
Frank Stutzman




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

end of thread, other threads:[~2014-05-12 20:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-12 17:32 elisp code for replacing every other occurence in a line? Frank Stutzman
2014-05-12 17:41 ` Grant Rettke
2014-05-12 19:22 ` Frank Stutzman
2014-05-12 20:43   ` Robert Thorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).