[Mpls-pm] Interesting RegEx Problem
Jim Anderson
jim at acadcam.com
Mon Sep 19 09:00:08 PDT 2005
On Mon, Sep 19, 2005 at 10:30:21AM -0500, Robert Fischer wrote:
> I've got a problem that just came up at work. Any help?
>
> Given an arbitrary string and a collection of regular expressions, and
> assuming that one and only one of the regular expressions match the
> string, what is the best way to find the matching regular expression?
Beyond the suggested "just keep trying them sequentially", if you have a
history of the arbitrary strings, you could sort the regular expressions
by frequency of occurance if performance is an issue.
--
Jim Anderson (612) 782-0456 jim at acadcam.com
Anderson CAD/CAM, Inc Lucifer designed MS-DOS to try
2500 Highway 88, Suite 108 men's souls.
St Anthony, MN 55418 Then he had a better idea...
More information about the Mpls-pm
mailing list