in reply to Glob best match?
You can define a score like this: eliminate all meta characters from the glob (so fred/*.mac becomes fred/.mac), and use the number of characters in that resulting string as a (crude) measure for specificity.
If you don't want to assign scores, but just compare pairs of globs for which one is more specific, a topologic sort can help you to get them in order for comparison.
|
|---|