in reply to How to remove all repeating characters in a string in place
$str =~ s/(.)\1+//g;
Update: Redid after seeing mr_ron's post. (was originally s/((.)\2+)//g;)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to remove all repeating characters in a string in place
by punitpawar (Sexton) on Jan 31, 2016 at 15:48 UTC | |
by AnomalousMonk (Archbishop) on Jan 31, 2016 at 19:19 UTC |