unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Glenn Morris <gmorris+news@ast.cam.ac.uk>
Subject: Re: grep can help?
Date: Wed, 21 Apr 2004 16:09:25 +0100	[thread overview]
Message-ID: <ghn055z7tm.fsf@xpc14.ast.cam.ac.uk> (raw)
In-Reply-To: c65uvj$5v5$1@defalla.upc.es

FCC wrote:

> Initially I was trying to use isearch for a regexp but only to
> search for those occurences which are not in comments (or which do
> not appear after the character !). After spending some time with
> Google, it turned out that this is not possible because one cannot
> "invert a match", which is what is required here.

M-x occur ^[^!C-qC-j]*regexp

ought to work (the C-qC-j bit gives you a newline).
It will be fooled by instances of your desired regexp occurring after
a string containing !, but I imagine that's unlikely. If you needed
to deal with that, you could cook up some elisp using f90-in-comment.

> Then came the idea to use grep.

I guess comp.unix.shell or somesuch place is the right place for grep
questions.

  reply	other threads:[~2004-04-21 15:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-21 14:01 grep can help? FCC
2004-04-21 15:09 ` Glenn Morris [this message]
2004-04-21 16:33   ` FCC
2004-04-21 16:52 ` LEE Sau Dan
2004-04-21 17:59 ` FCC
2004-04-22 10:27   ` Albert Reiner
2004-04-22 11:23     ` FCC
2004-04-22 14:14       ` Barry Margolin
2004-04-22 15:51 ` Johan Bockgård

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=ghn055z7tm.fsf@xpc14.ast.cam.ac.uk \
    --to=gmorris+news@ast.cam.ac.uk \
    /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.
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).