Enter an expression to expand
A Domain-Specific Language for Domain Names
A declarative language for describing finite sets of domain names using structural patterns. Write an expression, and DDSL expands it into all matching domain names.
Plain text: letters, digits, and hyphens
example
my-site
Choose between two or more options
{app,api,www}
{com,net,org}
Ranges with optional repetition
[a-z]
[a-z]{3}
[a-z]{2,4}
Exclude characters with ^
[^aeiou]{3}
[^0-9]{2}
[:v:] vowels, [:c:] consonants
[[:v:]]
[[:c:]]{3}
[[:c:]0-9]{2}
Group elements, with optional repetition
(abc)
(ab){2,3}
Make a group or element optional with ?
car(s)?
(-v[0-9])?
Combine patterns in alternations
{smart{car,bike},fast}
{[a-z]{3},foo}
Define and reuse patterns
@tlds = {com,net}
example.@tlds
Add notes with #
# API domains
api.com # main
{app,api}.example.com → app.example.com, api.example.comcar(s)?.com → car.com, cars.com[^aeiou]{3}.com → 29,791 domains (consonants + digits)[[:c:]][[:v:]][[:c:]].ai → 2,205 CVC domains(ab){2,3}.com → abab.com, ababab.com#set prefixes & suffixes
@prefix = {ab,rs,ev,pb}
@suffix = {ai,si}
#set keywords
@keywords = {agent,assistant,studio,lab,stack}
#alternate tlds
@tlds = {com,ai}
#generate
@prefix@keywords.@tlds
@keywords@suffix.@tlds
results →
abagent.com
abagent.ai
abassistant.com
..
agentai.com
agentai.ai
agentsi.com
@tlds = {com,net,org}
@env = {dev,prod}
# API endpoints
api.@env.example.@tlds
results →
api.dev.example.com
api.dev.example.net
api.dev.example.org
api.prod.example.com
api.prod.example.net
api.prod.example.org