Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Using regex to match double letters, and only double lettersby Anonymous Monk |
on Jan 09, 2021 at 15:54 UTC ( [id://11126658]=note: print w/replies, xml ) | Need Help?? |
My Perl-fu is non-existent but this caught my eye in another web search I was doing. I propose the following, non-golf, trivial method which does not require backreferencing; ([aA]{2}|[bB]{2}|[cC]{2}|[dD]{2}|[eE]{2}|[fF]{2}|[gG]{2}|[hH]{2}|[iI]{2}|[jJ]{2}|[kK]{2}|[lL]{2}|[mM]{2}|[nN]{2}|[oO]{2}|[pP]{2}|[qQ]{2}|[rR]{2}|[sS]{2}|[tT]{2}|[uU]{2}|[vV]{2}|[wW]{2}|[xX]{2}|[yY]{2}|[zZ]{2})Needless to say, yikes.
In Section
Seekers of Perl Wisdom
|
|