Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Backreference regex help

by Loops (Curate)
on Nov 01, 2014 at 06:56 UTC ( #1105781=note: print w/replies, xml ) Need Help??


in reply to Backreference regex help

Hi there,

It would be most helpful if you gave examples of input that doesn't work. Hard to know what you're seeing otherwise. That said, the match you're performing actually tests for strings that occur 6 or more times. The initial group ([A-Z]) counts as one character, and then five or more {5,}, for a total of six.

Try:

if (@match = $sequ{$k} =~ m/([A-Z])\1{4,}/g)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2022-05-16 19:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (63 votes). Check out past polls.

    Notices?