if(/www\.[a-z0-9][a-z0-9\-]{0,61}[a-z0-9]\.[a-z\.{2,6}]$/gi.test(url.value)) { // return true
This
permits but does not
require characters (such as
http://) before the
www.
The only valid characters for a domain name are letters, numbers and a hyphen "-". Hyphens may be anywhere in the middle of a name, but can not be located at the end or beginning of a name. A valid domain name does not have spaces. The domain name without the extension can be up to 63 characters.
All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.