3 ms·
I was actually building something very similar to this, though I stopped about six months ago due to time constraints. The goal was to be able to check which o
by amalcon 16y ago
I was actually building something very similar to this, though I stopped about six months ago due to time constraints. The goal was to be able to check which of a set of regular expressions matches a given string, and then invoke PCRE or similar to get the subexpression capture. The end result: Django-style regex URL routing against an arbitrary number of expressions, in the same amount of time as routing against a single expression.
Of course, I generally never use any of those features except the capture. (And greedy/nongreedy matching, but that is irrelevant if you're not doing a subexpression capture)