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: Re: Why are RegExps never working? Date: Sun, 11 Nov 2007 16:19:37 +0100 Message-ID: <87abpkolme.fsf@kamaloka.dhatu> References: <87lk94oozv.fsf@kamaloka.dhatu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0605068418==" X-Trace: ger.gmane.org 1194794432 6586 80.91.229.12 (11 Nov 2007 15:20:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 Nov 2007 15:20:32 +0000 (UTC) Cc: help-gnu-emacs@gnu.org 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 16:20:37 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 1IrEbv-0006pq-G8 for geh-help-gnu-emacs@m.gmane.org; Sun, 11 Nov 2007 16:20:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrEbj-0003k9-Dm for geh-help-gnu-emacs@m.gmane.org; Sun, 11 Nov 2007 10:20:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IrEbQ-0003ez-W3 for help-gnu-emacs@gnu.org; Sun, 11 Nov 2007 10:20:01 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IrEbO-0003Zl-Un for help-gnu-emacs@gnu.org; Sun, 11 Nov 2007 10:20:00 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrEbO-0003ZW-RO for help-gnu-emacs@gnu.org; Sun, 11 Nov 2007 10:19:58 -0500 Original-Received: from viefep28-int.chello.at ([62.179.121.48]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IrEbO-0007hA-87 for help-gnu-emacs@gnu.org; Sun, 11 Nov 2007 10:19:58 -0500 Original-Received: from kamaloka.dhatu ([80.219.162.86]) by viefep28-int.chello.at (InterMail vM.7.08.02.02 201-2186-121-104-20070414) with ESMTP id <20071111151956.GNYY9569.viefep28-int.chello.at@kamaloka.dhatu>; Sun, 11 Nov 2007 16:19:56 +0100 In-Reply-To: (Peter Dyballa's message of "Sun, 11 Nov 2007 15:47:52 +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:49137 Archived-At: --===============0605068418== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Peter You're my savior again. Thanks. Peter Dyballa writes: > You mean: what *are* ? I think it's still only one mistake. > Everything between square brackets, i.e. in [], are alternatives, no | > is needed. > What you are trying to search and destroy, ahhem, replace are not line > endings but line feeds inside the from expression. These are put into > the expression as C-q C-j.=20 This works perfectly (of course). I will search in the info for the difference between a line feed and an end of line, which is not clear to me. > The expression between [] won't look like > such, but I can give you some guarantee: it works! Definitely. > > And please read again what a "group" in regular expressions is! The `` > [ \|$]=C2=B4=C2=B4 and the ``[0-9]=C2=B4=C2=B4 are bracket expressions, a= faulty (for your > purpose) and a working one. If you want to re-use parts of the search > expression you can use: > > \(pp\.\)[ ^J]\([0-9]\) -> \1~\2 > > Line feed or SPC are converted to ~. Sorry, wrong terminology. Yes, I'm usually using "groups" like that to search and replace regexps. Thank you very much Sven --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHNx2OV5JTHLAduAYRAvB/AKDBv4JzXx3ggi7z2zcY9fpklEFgfACgqt3C wIYQCBqPEGyTnorGBS7qGeI= =j7+1 -----END PGP SIGNATURE----- --=-=-=-- --===============0605068418== 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 --===============0605068418==--