Re: [exim] Unexpected ${match} behaviour

Pàgina inicial
Delete this message
Reply to this message
Autor: Tony Finch
Data:  
A: Mike Cardwell
CC: Exim Mailing List
Assumpte: Re: [exim] Unexpected ${match} behaviour
On Thu, 7 Aug 2008, Mike Cardwell wrote:
>
> # exim -be '${if match{1}{(1)}
>                  {${extract {$1}{} {true} }}
>                  {false} }'
> true
> # exim -be '${if match{1}{(2)}
>                  {${extract {$1}{} {true} }}
>                  {false} }'
> Failed: first argument of "extract" must not be empty
> #

>
> Why does it fail the second time? Surely it should have just printed out
> the word "false" ? The match doesn't succeed so surely the second time
> the ${extract} shouldn't even be attempted?


I think this is a bug in the way Exim handles ${extract in the untaken
branch of a conditional.

Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}