Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Why doesn't quantifier work with character classes?

by thezip (Vicar)
on Aug 13, 2012 at 22:18 UTC ( #987227=note: print w/ replies, xml ) Need Help??


in reply to Why doesn't quantifier work with character classes?

Try:

... if ($string =~ /^[ATGC]{8}$/) { ...

Note the caret and dollar-sign. This should match sequences that are exactly eight characters long.


What can be asserted without proof can be dismissed without proof. - Christopher Hitchens, 1949-2011


Comment on Re: Why doesn't quantifier work with character classes?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2014-12-26 18:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (174 votes), past polls