in reply to regex problem

I don't think it's dumb to use a bracket just to see which branch of a regexp succeeded, or at least I do that too. For example, in the glob_to_re sub of my cgrep script, I use empty brackets for this reason. (Update: I've used ampersands as a regexp delimiter in a stupid moment, so look for m& if you can't find it.)