[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
About toothpicks (was Re: nnimap-split-fancy)
From: |
Štěpán Němec |
Subject: |
About toothpicks (was Re: nnimap-split-fancy) |
Date: |
Fri, 17 Dec 2010 18:30:39 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Tommy Kelly <tommy.kelly@verilab.com> writes:
> asjo@koldfront.dk (Adam Sjøgren) writes:
>> ... it helps
>> pinpointing where I have forgotten some \'s or something (I am used to
>> Perls regexp syntax, so remembering all the leaning toothpicks in Emacs
>> regexps is sometimes a problem :-))
>
> Yeah, me too. For example: why does the . in domain1.com require the
> "\\" when included in the fancy split approach, but no toothpicks at all
> are needed when the same string is included in the normal (non fancy)
> approach?
>
> At first I assumed it was because in the fancy approach the string is a regexp
> while in non-fancy it's just a plain string. But that's not true is it? The
> use of things like "^" and ".*" in non-fancy shows it's a regexp too,
> no?
It's really simple. '.' matches anything except newline, including a
dot. If you want to match a literal dot, you need '\.', but inside lisp
strings, double quotes and backslashes must be escaped with a backslash,
so what you end up with is "\\.".
Štěpán
- nnimap-split-fancy, Tommy Kelly, 2010/12/16
- Re: nnimap-split-fancy, Adam Sjøgren, 2010/12/17
- Re: nnimap-split-fancy, Tommy Kelly, 2010/12/17
- About toothpicks (was Re: nnimap-split-fancy),
Štěpán Němec <=
- Re: About toothpicks (was Re: nnimap-split-fancy), Tommy Kelly, 2010/12/17
- Error in (info "(gnus)Splitting Mail"), Štěpán Němec, 2010/12/18
- Message not available
- Re: Error in (info "(gnus)Splitting Mail"), Lars Magne Ingebrigtsen, 2010/12/18
- Re: Error in (info "(gnus)Splitting Mail"), Tommy Kelly, 2010/12/18
- Re: Error in (info "(gnus)Splitting Mail"), Ted Zlatanov, 2010/12/19
- Re: Error in (info "(gnus)Splitting Mail"), Štěpán Němec, 2010/12/19
- Re: Error in (info "(gnus)Splitting Mail"), Tommy Kelly, 2010/12/19
- Re: Error in (info "(gnus)Splitting Mail"), Ted Zlatanov, 2010/12/27
- Re: Error in (info "(gnus)Splitting Mail"), Steinar Bang, 2010/12/27
- Message not available
- Re: Error in (info "(gnus)Splitting Mail"), Richard Riley, 2010/12/27