Re: [exim] Using ${sg} to remove part of a string

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Stian Jordet
Ημερομηνία:  
Προς: John Jetmore
Υ/ο: exim-users
Αντικείμενο: Re: [exim] Using ${sg} to remove part of a string
fre, 30,.09.2005 kl. 10.50 -0500, skrev John Jetmore:
> On Fri, 30 Sep 2005, Stian Jordet wrote:
>
> > I'm looking for a way go use $recipients in an acl, without the optional
> > local part suffix. So, if $recipients = liste+test@??? I only
> > want liste@???. Is this possible with ${sg}?
>
> ${sg{$recipients}{\N\+[^\+\@]+\@\N}{@}}
>
> your mileage may vary, but seems to work in testing. If fed d+x+y@???, it
> returns d+x@???. I dunno how exim handles double suffixes like that, so
> this behaviour may not match it.


Thank you :) As I found out, Exim strip off the longest suffix, so I
needed something to match that. I found it out myself, but only because
of your kind help. This seems to work:

${sg{$recipients}{\N(\+.*?\@)\N}{@}}

Thank you again :)

Best regards,
Stian