in reply to Re: Supress similar chars in the string
in thread Supress similar chars in the string
use strict; use warnings; my $n = 3; # number of adjacent characters $n--; $_ = 'testing 1234567 ........ aaaaaaaasssssss __________ ++++++++++ - +-------- testing testing '; s/((.)\2{$n})\2*/$1/g; print;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Supress similar chars in the string
by Jim (Curate) on Jan 18, 2011 at 18:50 UTC | |
by Anonymous Monk on Jan 24, 2011 at 02:38 UTC | |
|
Re^3: Supress similar chars in the string
by AnomalousMonk (Archbishop) on Jan 18, 2011 at 22:26 UTC |