Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Backreference regex help

by Loops (Curate)
on Nov 01, 2014 at 06:56 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (7)
As of 2024-04-19 08:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found