nims has asked for the wisdom of the Perl Monks concerning the following question:
my @numbers = $aKnosID =~ m/([a]{2,}|[b]{2,}|[c]{2,}|[d]{2,}|[e]{2 +,}|[f]{2,}|[g]{2,}|[h]{2,}|[i]{2,}|[j]{2,}|[k]{2,}|[l]{2,}|[m]{2,}|[n +]{2,}|[o]{2,}|[p]{2,}|[q]{2,}|[r]{2,}|[s]{2,}|[t]{2,}|[u]{2,}|[v]{2,} +|[w]{2,}|[x]{2,}|[y]{2,}|[z]{2,})/g; if ( @numbers > 0 ) { #repetetive strings here; for ($i=0;$i<@numbers;$i++) { #Do something } } else { }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Finding / Replacing repetetive characters from a string in a Regular expression.
by deibyz (Hermit) on Oct 14, 2004 at 13:33 UTC | |
by nims (Novice) on Oct 14, 2004 at 14:27 UTC | |
|
Re: Finding / Replacing repetetive characters from a string in a Regular expression.
by JediWizard (Deacon) on Oct 14, 2004 at 13:29 UTC | |
by Roy Johnson (Monsignor) on Oct 14, 2004 at 13:33 UTC | |
by nims (Novice) on Oct 14, 2004 at 14:28 UTC |