Thank you, Dave.  A very nice piece of work.

I've been trying to understand regular expressions (I guess because I like puzzles).  In addition to giving me a better understanding of bash, the examples you gave show similarity with some regular expression syntax, which in turn gives some context to regular expression syntax, so that it does not seem to be quite so foreign a language.
