Regular Expressions 101

Community Patterns

1...456

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