Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I thought {8} will match exactly 8 characters, but looks like I am wrong! You aren't wrong, it does match exactly 8 characters ... but if those 8 characters are at the start of a line containing more than 8 characters, it still matches exactly the first 8. You need to anchor your regex: Ie. /^[ATGC]{8}$/. Now it will only match lines that contain exactly 8 characters. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In reply to Re: Why doesn't quantifier work with character classes?
by BrowserUk
|
|