|Do you know where your variables are?|
Re: Re: Re: Re: Re: Re: New Gathering section?by danger (Priest)
|on Jan 10, 2001 at 05:31 UTC||Need Help??|
Hmmm, Perl Mongers have always had a regex version of their name to take into account both Mongers and Mungers:
Relatively easy to match the right people. But if we mix up Mongers, Mungers, and Monks all in one place we will have a less gracefull time of matching desirable PM variants. I mean, we'll most certainly want to match any of these:
But this permissiveness certainly shouldn't extend to those who refer to themselves as:
So the question is, what can we come up with that retains the simple elegance of /Perl M(o|u)ngers/ (or its character class equivelant) and ensures that we aren't matching one of the more hideous deviants?
Well, a couple of obvious attempts might be:
Aaack! Just look at all those duplicated letters going to waste!
Bletch, still pretty ugly -- and look, both the 'o' and the 'n' are still wastefully repeated on both sides of the alternation (as if we had an endless supply of ascii letters, sheesh!). This simply won't do. Therefore, in my humble opinion, our only option in this matter is to screw simplicity and elegance and go for the minimum alphabetical liability:
Much better, don't you think? And only one extra 'g' wasted. Now, before you start screaming about how this will deplete our supply of much needed parentheses, don't panic -- rumour has it, Larry Wall been secretly siphoning off parentheses from old Lisp programs for years! (sshhh)..