4 ms·
Something missing from all such libraries that I find a little disappointing, is the ability to compile multiple regular expressions into a single evaluation wi
by _benedict 12y ago
Something missing from all such libraries that I find a little disappointing, is the ability to compile multiple regular expressions into a single evaluation with a paired action on the result, so that the regexp becomes a general purpose map with string domain. At its most basic, each regexp could then be paired with a different replacement operation. Or an arbitrary more complex action.
With a DFA representation (linear time evaluation), this is pretty powerful. I've a regexp library that supports this, that I've been meaning to spruce up for wider release, but it's been several years and I've yet to do it.
https://code.google.com/p/jjoost/source/browse/#hg%2Fjjoost-text%2Fsrc%2Forg%2Fjjoost%2Ftext%2Fpattern https://code.google.com/p/jjoost/source/browse/#hg%2Fjjoost-...