Open
Description
I'm making a new form library like formlets, and considering the ability to embed a regex as a validator/parser which would run on the server side with regex-applicative upon submission, but also, as a UX optimization, compile the same regex to a [a-z]{2}+
-style regex to be used as the pattern=".."
attribute for html5 (avoiding a roundtrip just to do a simple text format check). This would enable a developer to build forms with client and server-side validation composed using the same regex-applicative recipe.
So the question is: is there already a library or module that would convert an RE s a
to Text
? E.g.
render (many (sym 'a')) => "a*"
I assume I could write my own, but perhaps it already exists.
Thanks!