From: Karl K. <la...@so...> - 2008-04-01 17:23:26
|
On Mar 31, 2008, at 2:52 PM, Wesley Craig wrote: > I think the original code is flawed. It should be written just > exactly like the case for '*' is written: for each item in the > comma- separated { } list, if the item matches, then the rest of > the wildcard and the rest of the string should be passed > recursively to the function. This will implicitly find the first > item in the list which will cause an overall match, not just the > largest match. Very simple & elegant, and best of all, correct. Here is the requested re-write of the patch with recursion in mind. It passes all my test-rig tests, but I encourage others to test it as well. And to forestal any confusion, this is diff'ed against the CVS version, not against my previous diff. -- Karl Kuehn la...@so... |