Regular Expressions 101

Community Patterns

Community Library Entry

3

Regular Expression
Golang

`
(?i)^(?:([a-z0-9-]+|\*)\.)?([a-z0-9-]{1,61})\.([a-z0-9]{2,7})$
`
gm

Description

Validates subdomain, root domain, and wild card domains

Submitted by AnonymousDapper - 8 years ago