From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: Why are RegExps never working? Date: Sun, 11 Nov 2007 15:47:52 +0100 Message-ID: References: <87lk94oozv.fsf@kamaloka.dhatu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: multipart/mixed; boundary="===============0549505704==" X-Trace: ger.gmane.org 1194792524 1378 80.91.229.12 (11 Nov 2007 14:48:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 Nov 2007 14:48:44 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Sven Bretfeld Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 11 15:48:48 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 1IrE7E-0006Id-CG for geh-help-gnu-emacs@m.gmane.org; Sun, 11 Nov 2007 15:48:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrE72-0006ks-JS for geh-help-gnu-emacs@m.gmane.org; Sun, 11 Nov 2007 09:48:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IrE6V-0006cQ-8e for help-gnu-emacs@gnu.org; Sun, 11 Nov 2007 09:48:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IrE6Q-0006ZL-07 for help-gnu-emacs@gnu.org; Sun, 11 Nov 2007 09:48:02 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrE6P-0006Z8-JQ for help-gnu-emacs@gnu.org; Sun, 11 Nov 2007 09:47:57 -0500 Original-Received: from fmmailgate02.web.de ([217.72.192.227]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IrE6P-0003NS-24 for help-gnu-emacs@gnu.org; Sun, 11 Nov 2007 09:47:57 -0500 Original-Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate02.web.de (Postfix) with ESMTP id 79320ADBA787; Sun, 11 Nov 2007 15:47:55 +0100 (CET) Original-Received: from [195.4.205.234] (helo=[192.168.1.2]) by smtp07.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.108 #208) id 1IrE6N-0002nJ-00; Sun, 11 Nov 2007 15:47:55 +0100 In-Reply-To: <87lk94oozv.fsf@kamaloka.dhatu> X-Pgp-Agent: GPGMail 1.1.2 (Tiger) X-Mailer: Apple Mail (2.752.2) X-Sender: Peter_Dyballa@web.de X-Provags-ID: V01U2FsdGVkX1+fCesvMIyjkLz8eLazm9KYoqAvvohphfEh+35X seEg091JuLB24RdS1eXdQ9FQeeHl/5VC97E/8hxJLhz2vnKkmc U4PWTYmfUz8A9x4/fy/w== X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:49136 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============0549505704== Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-1--410575497" Content-Transfer-Encoding: 7bit This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-1--410575497 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Am 11.11.2007 um 15:06 schrieb Sven Bretfeld: > 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. > > ... > > What's my mistake? You mean: what *are* ? Everything between square brackets, i.e. in [], are alternatives, no =20 | is needed. What you are trying to search and destroy, ahhem, replace are not =20 line endings but line feeds inside the from expression. These are put =20= into the expression as C-q C-j. The expression between [] won't look =20 like such, but I can give you some guarantee: it works! Definitely. And please read again what a "group" in regular expressions is! The ``=20= [ \|$]=B4=B4 and the ``[0-9]=B4=B4 are bracket expressions, a faulty = (for =20 your purpose) and a working one. If you want to re-use parts of the =20 search expression you can use: \(pp\.\)[ ^J]\([0-9]\) -> \1~\2 Line feed or SPC are converted to ~. -- Mit friedvollen Gr=FC=DFen Pete Well done is better than well said. -- Benjamin Franklin --Apple-Mail-1--410575497 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: Signierter Teil der Nachricht content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iEYEARECAAYFAkc3FhgACgkQNkpl4NeD2QDtWwCg1Np3AouFTgHdlj00Dycb7D8R nYkAoK/k/BW4je+59+9EnmzvsD2NVaQD =BWaL -----END PGP SIGNATURE----- --Apple-Mail-1--410575497-- --===============0549505704== 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 --===============0549505704==--