
Sebastian Proost wrote:
lieven sterck wrote:
a perl regex to check whether a sequence is pure DNA or not.
bonus question: what if I also need to allow IUPAC code for DNA.
thx, L.
m/[ATCG]*/i for DNA.
bonus: Add extra IUPAC chars between brackets
correction: m/^[ATCG]*$/i for DNA. since entire string should be made up of these chars (maybe you also need round brackets around the square ones... I haven't tested it ;) -- ================================================================== Sebastian Proost PhD Student Tel:+32 (0)9 331 36 92 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM sepro@psb.ugent.be http://www.psb.ugent.be ================================================================== "If I knew what I was doing, it wouldn't be called research." --Albert Einstein