The lack of readability of regex makes me wonder if there isn't a better way. I've seen Elm's parser which introduces a few neat concepts like parser pipelines. https://github.com/elm-tools/parser
It also has first-class grammars, so you're less tempted to reach for regex when something more powerful would help.