From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sven Bretfeld Newsgroups: gmane.emacs.help Subject: Why are RegExps never working? Date: Sun, 11 Nov 2007 15:06:44 +0100 Message-ID: <87lk94oozv.fsf@kamaloka.dhatu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1823623973==" X-Trace: ger.gmane.org 1194790071 27601 80.91.229.12 (11 Nov 2007 14:07:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 Nov 2007 14:07:51 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 11 15:07:56 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 1IrDTf-0004TZ-4r for geh-help-gnu-emacs@m.gmane.org; Sun, 11 Nov 2007 15:07:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrDTT-0006v5-5a for geh-help-gnu-emacs@m.gmane.org; Sun, 11 Nov 2007 09:07:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IrDSy-0006nR-4i for help-gnu-emacs@gnu.org; Sun, 11 Nov 2007 09:07:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IrDSt-0006j4-HM for help-gnu-emacs@gnu.org; Sun, 11 Nov 2007 09:07:11 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrDSt-0006it-AB for help-gnu-emacs@gnu.org; Sun, 11 Nov 2007 09:07:07 -0500 Original-Received: from viefep18-int.chello.at ([213.46.255.22] helo=viefep24-int.chello.at) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IrDSs-0007Te-Qj for help-gnu-emacs@gnu.org; Sun, 11 Nov 2007 09:07:07 -0500 Original-Received: from kamaloka.dhatu ([80.219.162.86]) by viefep24-int.chello.at (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20071111140704.GBXG11550.viefep24-int.chello.at@kamaloka.dhatu> for ; Sun, 11 Nov 2007 15:07:04 +0100 User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) 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:49133 Archived-At: --===============1823623973== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Hello all I'm just a beginner in using Regexp operations. I know that Emacs RegExps are somewhat different from those of awk etc. But I'm using the GNU Emacs manual to look them up. I usually need them to do some editing (isearch-forward-regexp or query-replace-regexp) in LaTeX-files which were MS-Word files originally. I'm using AucTeX in Emacs 22.1.50.1. For example, I want to search every occurrence of pp. `number' (to replace it by pp.~`number'). Instead of space, pp. can also be followed by an end-of-line. So I think this RegExp should be correct: pp\.[ \|$][0-9] To my understanding, it should mean: the string pp. followed by a group consisting of space or end-of-line followed by a number. Alas, occurrences of pp. at the end of a line are never found. I've also tried \n instead of $ and [ $] instead of [ \|$] -- all with the same result. What's my mistake? Thanks for help Sven --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHNwx7V5JTHLAduAYRAlbMAKCmHZ9SvT40xDOouQlXEtGufH9BhwCgjk2/ IgBZvp4Oy1itss2OZgEIW3c= =1LqL -----END PGP SIGNATURE----- --=-=-=-- --===============1823623973== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============1823623973==--