From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Albert Reiner Newsgroups: gmane.emacs.help Subject: Re: grep can help? Date: Thu, 22 Apr 2004 10:27:52 GMT Organization: Customers chello Austria Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <86brlkmhj7.fsf@chello.at> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1082631015 12895 80.91.224.253 (22 Apr 2004 10:50:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 22 Apr 2004 10:50:15 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 22 12:50:08 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 1BGbmS-0007jp-00 for ; Thu, 22 Apr 2004 12:50:08 +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 1BGbXG-0007da-Nh for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Apr 2004 06:34:26 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!feed.news.tiscali.de!newsfeed01.chello.at!news.chello.at.POSTED!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 20 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Original-NNTP-Posting-Host: 213.47.68.64 Original-X-Complaints-To: abuse@news.chello.at Original-X-Trace: news.chello.at 1082629672 213.47.68.64 (Thu, 22 Apr 2004 12:27:52 CEST) Original-NNTP-Posting-Date: Thu, 22 Apr 2004 12:27:52 CEST Original-Xref: shelby.stanford.edu gnu.emacs.help:122559 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:17846 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17846 FCC writes: > > Hello all, > > Here is what I am trying to do: I have fortran90 source files full > > of comments everywhere. A comment starts with ! and continues until ... > OK, I think I solved my problem: replace-regexp "!.*" " " and all the > comments are gone, and the line numbers are unchanged. Now, the ... Just to point out the obvious: This does not take into account exclamation marks in string constants, and the standard also allows you to write F90 in fixed format in which case you might use ! in column 5 (?) for continuation lines. Of course it depends on your code whether this is a problem; a general solution would need to parse F90 in both formats. Albert.