Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Count the number of matched characters

by borisz (Canon)
on May 28, 2006 at 10:36 UTC ( [id://552158]=note: print w/replies, xml ) Need Help??


in reply to Count the number of matched characters

You need to count the number of 'A'. Your code try to match 14..17 A without any other chars inbeetween.
$string_to_match='QWERTAAWAAAAKAAAAAAAA'; if ( substr($string_to_match, -17) =~ y/A// >= 14 ) { print 'Correct'; }
Boris

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 11:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found