in reply to Re: Finding / Replacing repetetive characters from a string in a Regular expression.
in thread Finding / Replacing repetetive characters from a string in a Regular expression.
Except that both captures get returned. So to fix:my @numbers = $aKnosId =~ /(([a-z])\2+)/g;
my @numbers = grep {length > 1} $aKnosId =~ /(([a-z])\2+)/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Finding / Replacing repetetive characters from a string in a Regular expression.
by nims (Novice) on Oct 14, 2004 at 14:28 UTC |