So in my Javascript codebase I have a Regex that’ll take a string that’s essentially a bash command and split it into an array on spaces. However, it will keep all items between single quotes together in a single array index.
I was planning on using the same regex and use Regex.find until I stumbled onto Parsers.
It seems like a Parser might be a good way forward but then again I do have a regex that works pretty well (for now).
What would the idiomatic Elm way for this be? I feel like Parser might be my best best, but wanted to ask here before spending a ton of time learning that new concept on top of everything else.
P.S. I’m just messing around to see if I can take some of our more complex pieces of logic and move that into Elm for a potential rewrite we’ve been planning for the last year.
I like writing parsers, so I wrote up a very rough thing. I did not put it through a compiler or anything, so ask someone else if there are errors or anything. This is just for example!