Last week, in Reg Expression Question I was a bit rough on a newbie. The question was basically "How to I determine if X is a member of set Y?" (with an attempted solution using a regex) A bunch of us jumped on the question right after it was posted, in our haste azatoth posted an incorrect answer. Not a big deal, azatoths been around and can take it when several of us pointed out the mistake. However this set the stage for my mood in a later posting.....
Two good solutions were proposed, 1.) grep an array made from the set, or 2.) check for a hash key in a hash made from the set. A regex is ill suited for this task, which I thought this had been communicated in the thread. However, two hours later, a newbie pix used his second post ever to suggest using a regex. It happens to contain an overlooked 'gotcha' lurking within. I felt that anyone who read the previous posts should be able to conclude that regexes were not the way to go, so I shot down the suggestion with a bit more gusto than I should have. (I toned the node down significantly after the fact)
I hadn't realized that I was roasting someone's second post, and some of the mistakes earlier in the thread had been edited so it didn't read quite like I assumed it did. I'm concerned that my grumbling might have made pix a bit gunshy......
Anyway, pix if you're out there, sorry I roasted your second post. It actually was a rather clever way to address the problem, swapping the data and regex around. While I wouldn't recommend this technique over the others, it did have a "coolness" factor to it that I totally overlooked before. I didn't mean to blast a newbie, and was more harsh than necessary.