Charles,
I truly am laughing as I type this.:) Your answer is so correct and so obvious. However I will note that (somewhat sadly, I suppose, although I really don't feel that way; maybe because this has been the case for so many years now that it is no longer, and has not been for a very long time, an "emotional" issue for me - it would be kind of like having "feelings" about the fact that the sky is blue) I no longer use "tools" like "grep" and the like (unless I'm essentially "forced" to, which hasn't happened for many years) because I have used too many pattern-matching programs of one kind or another over the years (almost 40 years at this point); and in most cases the program I used was the only program I could use at that particular point in time for whatever reason such as operating system/availability/whatever so that I had to learn the syntax of its "regular expressions"; and with my developing bad memory I found remembering the particular syntax of the "patterns" of this particular program vs. the syntax of the "patterns" of all of its "alternatives" (and the fact that the individual syntax of the patterns for the various programs are typically very similar but not identical actually makes things far worse for me because trying to remember the small syntax differences between this particular program vs. that particular program became simply more than I could handle). For me, the simple "*" and "?" "wildcards" like in TCC and even plain old DOS are sufficient for my needs probably upwards of 95% of the time; and when they are not I could easily "come up with" an alternative, fairly simple like my suggested "solution" above is, way to do it that I can pretty much immediately fully understand. Yes, I can "read" the pattern in your "grep" (barely!), but trying to compose it would simply take too much time and effort for me and looking at a "help document" of some kind whereas, for me (and probably no one else) my solution was simple and straightforward and required almost no thought whatsoever - or, to say it another way, your "solution" is, without any doubt whatsoever, better than mine is in a "general" sense; but I will still continue to do things my way because they are, for me, simple and straightforward and require almost no thought. However I (will at least try to remember to :)) not "answer" any more questions like that on this bulletin board!
- Dan