Beefy Boxes and Bandwidth Generously Provided by pair Networks chromatic writing perl on a camel
No such thing as a small change
 
PerlMonks  

Re: repeated characters in regular expressions

by kcott (Abbot)
on Aug 01, 2013 at 08:03 UTC ( #1047388=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    s/(.)\1{$n}/$1 x $m/eg;
    
  2. or download this
    $ perl -Mstrict -Mwarnings -E '
        sub mod_char_count {
    ...
    '
    p8er9l
    mmmooonnnkkksss
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1047388]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2014-04-21 00:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (489 votes), past polls