by IshKebab · 1y ago · 0 comments
But it's not a good idea to use regexes in code that you're going to use long term. It's justifiable for simple regexes, and many people go against this advice, but really for anything remotely complex regexes become totally unreadable and extremely bug prone. Complex regexes are a huge code smell and array languages are pretty much one enormous regex.
I wrote something like that in C# once [0] but I'm not getting the impression that there's a lot of demand for that kind of thing.
[0] https://share.unison-lang.org/@unison/website/code/main/late...
https://github.com/oils-for-unix/oils/wiki/Alternative-Regex...
I haven't actually used them because generally the right alternative to a regex is a proper parser.