Re: [Exim] Re: Bug#233927: exim4-doc-info: clarify meaning o…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: Andreas Metzler
Υ/ο: exim-users, 233927-forwarded, Ross Boylan
Αντικείμενο: Re: [Exim] Re: Bug#233927: exim4-doc-info: clarify meaning of "matches"
On Tue, 24 Feb 2004, Andreas Metzler wrote:

> Filter:
> -For a `matches' test, after expansion of both strings, the second one
> -is interpreted as a regular expression. Exim uses the PCRE regular
> -expression library, which provides regular expressions that are
> -compatible with Perl.
>
> +A `matches' test expands both strings and interprets the second one as
> +a regular expression. The match succeeds if the regular expression
> +matches any part of the first string. Exim uses the Perl-compatible
> +PCRE regular expression library.


Unfortunately, that is also not true. If the regex starts with ^ it will
match only at the start of the string; if it ends with $ it will match
only at the end of the string. This is, of course, exactly compatible
with Perl.

> Perhaps a big fat note in chapter 8?
> | In this document the term "a regular expression matches" refers
> | to partial matching, i.e. the expression "oo" matches "foobar", it
> | is not necessary to match the whole string with something like
> | ".oo.*".


I will try to explain better.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book