Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incorrect regular expression to permit hyphenated-subdomains
The hyphen in .-_ is not treated as a literal hyphen unless it occurs at the end of the [] group. This can be demonstrated in the JS console: 'hyphenated-site'.match( /^[a-z.-_]+$/ ) // null 'hyphenated-site'.match( /^[a-z._-]+$/ ) // [ ...results ] Reordering these characters allows hyphenated-subdomains to be matched.
- Loading branch information