Y
Hacker News
new
|
ask
|
show
|
jobs
by
cfv
2033 days ago
It'd be absolutely bonkers if you could use this exact same DSL to
generate
valid strings
3 comments
recursive
2033 days ago
Well, since you can use the regex itself to generate valid strings, it's certainly possible.
link
slifin
2033 days ago
https://github.com/lambdaisland/regal
Is a regex DSL that will let you do that, wouldn't be surprised to see others
link
m12k
2033 days ago
You can - use this to generate a regex, then run that regex through one of these libraries:
https://stackoverflow.com/a/22133/126183
link