Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: repeated characters in regular expressions

by kcott (Canon)
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (12)
As of 2016-12-08 15:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (143 votes). Check out past polls.