in reply to Re^2: Most specific pattern
in thread Most specific pattern
That was just one of the metrics that I could think of... unless the number of regexes were so large that you couldn't rank them yourself (Going with the assumption that I know more about the process than a regex does)
If I had to go completely on just odds of matching, I would think it'd be easiest to take a representative sample of inputs, and test them against each of the regexes, and build a table with the odds.
If you don't have a log of those inputs for testing, then we'd have to get more creative ... I might use something like the following --
I'm not aware of a module to do this sort of things, but that doesn't mean that there isn't one out there.
|
|---|