all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How, in a QUERY-REPLACE-regexp, to match a RANGE of lines?
@ 2010-02-17 20:22 David Combs
  2010-02-17 23:12 ` Peter Dyballa
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: David Combs @ 2010-02-17 20:22 UTC (permalink / raw)
  To: help-gnu-emacs

subj: How, in a QUERY-REPLACE-regexp, to match a RANGE of lines?



Like from a line containing xxx up through the nearest one containing yyy?


Totally separate question:

(Any easy way to give error msg if you see another xxx-line before
that yyy? -- other than by explicit loop looking at each line and
remembering what it saw?)


Or do you have to write an explicit loop -- checking each individual
line, remembering what you've seen so far (eg, xxx), etc.

In elisp, how would you do that?


Thanks,

David

PS: reason for this: I've got a bunch of Amazon reviews (hundreds
of them), each containing these six lines:


 | Help other customers find the most helpful reviews  
 | Was this review helpful to you?  Yes No
 | 	
 | 	
 | Report this | Permalink
 | Comment Comment



But, now and then, I might have already removed any 
one or more of them.  So I got to make sure it's as
I think it is.


Any way to recognize those six lines with ONE regexp?





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

end of thread, other threads:[~2010-02-19 10:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-17 20:22 How, in a QUERY-REPLACE-regexp, to match a RANGE of lines? David Combs
2010-02-17 23:12 ` Peter Dyballa
     [not found] ` <mailman.1412.1266448375.14305.help-gnu-emacs@gnu.org>
2010-02-19  5:59   ` David Combs
2010-02-19  9:25     ` Peter Dyballa
2010-02-19 10:04 ` Andreas Röhler

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.