Perl Monk, Perl Meditation | |
PerlMonks |
RE: RE: Re: removing duplicate lettersby takshaka (Friar) |
on Jun 19, 2000 at 01:53 UTC ( [id://18735]=note: print w/replies, xml ) | Need Help?? |
If we're going to be pedantic, \w matches nonletters
as well. Use a character class with the appropriate
definition of "letters". s/([a-zA-Z])\1/$1/g;
In Section
Seekers of Perl Wisdom
|
|