From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.help Subject: Re: Why are RegExps never working? Date: Tue, 13 Nov 2007 18:37:49 +0200 Message-ID: <20071113163749.GA3083@kobe.laptop> References: <87lk94oozv.fsf@kamaloka.dhatu> <87abpkolme.fsf@kamaloka.dhatu> <873avbyq9l.fsf@kobe.laptop> <3A73B20F-E3D8-40F1-B292-9389A351ECAF@Web.DE> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1194971957 4140 80.91.229.12 (13 Nov 2007 16:39:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Nov 2007 16:39:17 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Peter Dyballa Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 13 17:39:16 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Iryn8-0000vA-MQ for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Nov 2007 17:39:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Irymw-0004aZ-B4 for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Nov 2007 11:38:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Irymg-0004YB-FG for help-gnu-emacs@gnu.org; Tue, 13 Nov 2007 11:38:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iryme-0004WP-Oi for help-gnu-emacs@gnu.org; Tue, 13 Nov 2007 11:38:42 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iryme-0004WC-Hu for help-gnu-emacs@gnu.org; Tue, 13 Nov 2007 11:38:40 -0500 Original-Received: from igloo.linux.gr ([62.1.205.36]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Irymd-0004eg-UV for help-gnu-emacs@gnu.org; Tue, 13 Nov 2007 11:38:40 -0500 Original-Received: from kobe.laptop (vader.bytemobile-rio.ondsl.gr [83.235.57.37]) (authenticated bits=128) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id lADGbvP8028664 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 13 Nov 2007 18:38:13 +0200 Original-Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id lADGbplA003128; Tue, 13 Nov 2007 18:37:51 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Original-Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id lADGboVR003127; Tue, 13 Nov 2007 18:37:51 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Content-Disposition: inline In-Reply-To: <3A73B20F-E3D8-40F1-B292-9389A351ECAF@Web.DE> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.993, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.41, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:49216 Archived-At: On 2007-11-13 16:49, Peter Dyballa wrote: > > Am 13.11.2007 um 00:53 schrieb Giorgos Keramidas: > >> \([[:space:]][pP][pP]\.\)[[:space:]]+\([0-9]+\) -> \1~\2 > > Did you try it? For me it does correct Sven's example, which is this: > > text pp. 44 text text text text text text text text pp. > 54 text > > It would work when the from part would not stretch over more than one line. I did. I used an Emacs snapshot from CVS, but I have this sort of regexp in my ~/NOTES file for several years. The last time I updated the note was on May 15, 2004. It is strange that it doesn't work there. I just tried once more, by running: emacs -q -nw Then I pasted in a text-mode buffer the text: text pp. 44 text text text text text text text text pp. 54 text and after replacing the regexp shown above, my buffer now contains: text pp.~44 text text text text text text text text pp.~54 text Odd, indeed...