Autor: Ben Smithurst Data: A: Tabor J. Wells CC: ph10, exim-users Assumpte: [Exim] Re: Detecting case of headers in a system filter
Tabor J. Wells wrote:
> Given a message's headers that look like:
>
> DATE: 10 Dec 00 4:52:20 PM
> FROM: W58hj1lcy@???
> Message-ID: <C8NThg9BbCN6F3GD>
> SUBJECT: Your financial future
>
> Why doesn't the line in my test filter:
>
> $message_headers matches "DATE: .*FROM: .*SUBJECT:"
>
> match these headers?
"." doesn't match \n by default, insert "(?s)" at the start of the
regular expression for that.
> I realize that this doesn't deal with the issue of case either, so my
> next question would be how do I ensure that I match only when these
> headers are uppercase.
uh, I thought regexes were case sensitive by default. They are in Perl
at least, if Exim changes that somehow then perhaps "(?-i)" at the front
might make it case sensitive again, I'm not sure.