Re: [exim] Regex String Help

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: David S. Madole
Ημερομηνία:  
Προς: Marc Perkel, exim
Υ/ο: 
Αντικείμενο: Re: [exim] Regex String Help
> From: "Marc Perkel" <marc@???>
>>
>> OK - I don't know if this can be done but suppose I have a string with
>> a number of items in it that are separated by spaces - and I want to
>> remove all duplicate items for the string. Is there an easy way to do
>> that?
>>
>
> How about this?


I just notice that the regex I posted didn't work right in the case of
immediately adjacent repeats. This one does:

${sg{${sg{ $h_X-Sender-Nameserver } \
{\N\s(.*?)(?=\s(.*\s)?\1\s)\N}{}}}{\N^\s|\s(?=\s)|\s$\N}{}}

David