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;
In Section
Seekers of Perl Wisdom
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;