[exim] Unexpected ${match} behaviour

Top Page
Delete this message
Reply to this message
Author: Mike Cardwell
Date:  
To: Exim Mailing List
Subject: [exim] Unexpected ${match} behaviour
Hi,

Can someone explain this to me please:

root@clayman:~# exim -be '${if
match{1}{(1)}{${extract{$1}{}{true}}}{false}}'
true
root@clayman:~# exim -be '${if
match{1}{(2)}{${extract{$1}{}{true}}}{false}}'
Failed: first argument of "extract" must not be empty
root@clayman:~#

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?

Is this by design?

Mike