I have this pattern:
~^([a-z0-9]+[a-z0-9-]+[a-z0-9]+\.([a-z]+)(\.[a-z]+)?)$~i
It will match the following:
xxx.xxx
or
xxx.xxx.xxx
(number of x per doesn't matter)
How do I disallow xxx.xxx.xxx
if the set of characters before the first .
is wwww
?
For example, it should allow example.co
or example.co.uk
but it should not allow www.example.co
or www.example.co.uk