Re: [exim] ACL filtering 3 dashes in host name

Top Page
Delete this message
Reply to this message
Author: Olivier B.
Date:  
To: Exim Users List
Subject: Re: [exim] ACL filtering 3 dashes in host name
Drav Sloan a écrit :
> Phil (Medway Hosting) wrote:
>
>>> How does one catch host names containing three hyphens (or dashes) ?
>>>
>> I am not an exim expert and I manage a number of different servers, but the
>> regex I use to catch generic looking hostnames and PTR, is:
>>
>> [0-9]{1,3}[\-\.][0-9]{1,3}[\-\.][0-9]{1,3}.*\.[a-zA-Z]{2,3}$
>>
>
> You can simplify that somewhat. If the last char of a range expression
> is a - it is not expanded and doesn't need to be escaped.
>
> [0-9]{1,3}[\.-][0-9]{1,3}[\.-][0-9]{1,3}.*\.[a-zA-Z]{2,3}$
>
> Just FYI :)
>
> Regards
>
> D.
>
>
>

And the "." doesn't need to be escaped between [ ].

[0-9]{1,3}[.-][0-9]{1,3}[.-][0-9]{1,3}.*\.[a-zA-Z]{2,3}$

No ?

Olivier