help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grep can help?


From: FCC
Subject: Re: grep can help?
Date: Wed, 21 Apr 2004 18:33:29 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040316

Glenn Morris wrote:

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.

I did try M-x occur ^[^!C-qC-j]*stress and the result was `no match'.

Thanks anyway,

FCC.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]