all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: dkcombs@panix.com (David Combs)
To: help-gnu-emacs@gnu.org
Subject: How, in a QUERY-REPLACE-regexp, to match a RANGE of lines?
Date: 17 Feb 2010 15:22:19 -0500	[thread overview]
Message-ID: <hlhj5r$2mv$1@panix2.panix.com> (raw)

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?





             reply	other threads:[~2010-02-17 20:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17 20:22 David Combs [this message]
2010-02-17 23:12 ` How, in a QUERY-REPLACE-regexp, to match a RANGE of lines? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='hlhj5r$2mv$1@panix2.panix.com' \
    --to=dkcombs@panix.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.