Re: [Exim] recursive regmatch

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: tcurdt
CC: exim-users
Sujet: Re: [Exim] recursive regmatch
On Fri, 5 Nov 1999 tcurdt@??? wrote:

I haven't worked this all through, but

> *@* "$1@\
>        ${lookup{\
>             ${if match{$2} {^[^\\\\.]+(.*)\\$}\

                                 ^^^^
                                 ^^^^
                You do not need these because '.' is not special
                inside a character class (i.e. inside []).                  


>                 {\
>                    ${if match{$2} {^[\\\\.]+(.*)\\$}\
>                       { here should be the result of the 2nd match,
>                         but $1 doesn't work }


>                       { here should be the $2 before the match }


                        That you can't have because you can't get at a 
                        mixture of results from two different matches.



>                     }\
>                 }\
>                 {$2}\
>              }\
>        } lsearch{/etc/exim/localdomains} {$value} {$2} }"

>
> How do make it work?


Put the ${if match outside the ${lookup (i.e. write two different
${lookups.


-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Government Policy: If it ain't broke, fix it till it is.