[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why are RegExps never working?
From: |
Sven Bretfeld |
Subject: |
Re: Why are RegExps never working? |
Date: |
Sun, 11 Nov 2007 16:19:37 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.1.50 (gnu/linux) |
Hi Peter
You're my savior again. Thanks.
Peter Dyballa <Peter_Dyballa@Web.DE> 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.
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 ``
> [ \|$]´´ and the ``[0-9]´´ 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
pgpv4defFUo9b.pgp
Description: PGP signature
- Why are RegExps never working?, Sven Bretfeld, 2007/11/11
- Re: Why are RegExps never working?, Bastien, 2007/11/11
- Re: Why are RegExps never working?, Peter Dyballa, 2007/11/11
- Re: Why are RegExps never working?,
Sven Bretfeld <=
- Message not available
- Re: Why are RegExps never working?, Harald Hanche-Olsen, 2007/11/12
- Re: Why are RegExps never working?, Sven Bretfeld, 2007/11/12
- Re: Why are RegExps never working?, Lennart Borgman (gmail), 2007/11/12
- RE: Why are RegExps never working?, Drew Adams, 2007/11/12
- Re: Why are RegExps never working?, Sven Bretfeld, 2007/11/12
- Message not available
- Re: Why are RegExps never working?, Richard G Riley, 2007/11/12