Regex · Domain name · Free
Domain name regex.
Matches a domain name with one or more labels and a letter-only top-level domain. Copy the pattern below, see what it matches, then tweak it for your exact case with the free generator.
The pattern
/\b(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}\b/g
✓ Matches
mindloomhq.comsub.example.co.uka-b.io✗ Doesn't match
localhostexample-bad.comNeed a variation? Generate one
Other common patterns
Parsing and pattern-matching are everywhere in AI systems. MindloomHQ teaches you to build them for real — agents, RAG, pipelines — with projects and certificates.
Explore MindloomHQ →