Tommy Kelly <tommy.ke...@verilab.com> writes:

> a...@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

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english

Reply via email to