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

-- 
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to