Noel Jones:
> On 3/29/2012 5:48 AM, Wietse Venema wrote:
> > You mean:
> > 
> >     /^google\.com$/
> >     /^mail\.ru$/
> 
> The expression must also match subdomains.
> 
> /[^.]google\.com$/
> /[^.]mail\.ru$/

To match zero or more labels before the domain name:

    /^([^.]+\.)*google\.com$/
    /^([^.]+\.)*mail\.ru$/

This cannot be simplified further.

        Wietse

Reply via email to