From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: FCC Newsgroups: gmane.emacs.help Subject: Re: grep can help? Date: Wed, 21 Apr 2004 18:33:29 +0200 Organization: Universitat Politecnica de Catalunya Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1082566176 10133 80.91.224.253 (21 Apr 2004 16:49:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 21 Apr 2004 16:49:36 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 21 18:49:30 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BGKug-00082O-00 for ; Wed, 21 Apr 2004 18:49:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BGKsy-0001vd-Tf for geh-help-gnu-emacs@m.gmane.org; Wed, 21 Apr 2004 12:47:44 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!news.tele.dk!news.tele.dk!small.news.tele.dk!irazu.switch.ch!switch.ch!news.rediris.es!news.cesca.es!news.upc.es!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-NNTP-Posting-Host: adca05.upc.es Original-X-Trace: defalla.upc.es 1082565352 16389 147.83.51.18 (21 Apr 2004 16:35:52 GMT) Original-X-Complaints-To: newsmngr@upc.es Original-NNTP-Posting-Date: 21 Apr 2004 16:35:52 GMT User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040316 X-Accept-Language: en-us, en, es-es, tr In-Reply-To: Original-Xref: shelby.stanford.edu gnu.emacs.help:122534 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:17821 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17821 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.