the rule is that the longest matching pattern is always chosen.

Even if there are multiple results? I'm thinking of something like a perl global search and replace (s/pattern/not pattern/g), but I don't know how gawk does that sort of thing.

-Mike
_________________________
EmpMenuX - ext3 filesystem - Empeg iTunes integration