On Sun, 21 Feb 1999, Ben Smithurst wrote:
> > if $header_Received: matches "from blah.example.com.*by mail.example.net" then
> > something....
> >
> > and the rule doesn't match. should it?
>
> I think it's something to do with "." not matching \n. In perl, you can
> use the /s modifier, so perhaps
>
> if $header_Received: matches "(?s)from blah.example.com.*by mail.example.net" then
>
> would do the right thing, since I think Exim uses Perl compatible REs,
> and including (?s) in a RE is the same as using the /s modifier on the
> end. (See perlre(1) manpage.)
>
> disclaimer: I may well be talking bullshit.
No you are not. That is entirely correct. The better man page to look at
is pcre.3, which you will find in the src/pcre directory of your Exim
distribution. (Better because it describes what is actually in Exim,
rather than what it is supposed to be emulating.)
I have always felt this "feature" of Perl regexs to be a trap, but my
feeling that PCRE should try to be as compatible with Perl as possible
is now stronger. (Early versions of PCRE were different, but I realised
this was probably not the best thing.)
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.
--
*** Exim information can be found at
http://www.exim.org/ ***