Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: self limiting regex help

by danger (Priest)
on May 22, 2002 at 15:53 UTC ( #168491=note: print w/ replies, xml ) Need Help??


in reply to self limiting regex help

If I understand your conditions correctly, this should do:

print if /^ [ACGT]* ([RYMKSWHBVDN])? (?:[ACGT]|\1)*([RYMKSWHBVDN])? (?:[ACGT]|\1|\2)*$ /ix;


Comment on Re: self limiting regex help
Download Code
Re: Re: self limiting regex help
by spq (Friar) on May 22, 2002 at 16:36 UTC

    Eureka! I was just attempting to do something similar, but had discovered that \n doesn't work in a character class.

    Thank you (and everyone who responded) very much for your help!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2015-07-04 21:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls