Domain Name Validation Regex Javascript. Lets say you want to make sure that usernames are only alphanumeric. Use Tools to explore your results.
The pattern attribute specifies a regular expression that the elements value is checked against on form submission. B a-z0-9 - a-z0-9 a-z 2b. However you can go even further and specify a pattern that a username or email address has to follow in order to be considered valid.
NET Java JavaScript PCRE Perl Python Ruby.
Note that last part might contain hyphens too. Save share expressions with others. NET Java JavaScript PCRE Perl Python Ruby. Supports JavaScript PHPPCRE RegEx.