My question follows that one: file(1) and magic(5) : describing other formats .
I want to describe a FASTA sequence ( http://en.wikipedia.org/wiki/FASTA_format)
It could be a DNA sequence (with only ATGC)
>header
ATGCTAGCATAGCATCGATGCTGTAGCTACGTAGCTACGTCTACG
A 'magic' pattern would be
>.*\n[ATGC]*
or a PROTEIN sequence ( ACDEFGHIKLMNPQRSTVWYBZX containing ATGC too)
>header
AHITKLMNPQRGHIKLMNPQRC
A 'magic' pattern would be
>.*\n[ACDEFGHIKLMNPQRSTVWYBZX]*
But whenever I use those regular expressions, file tells me that it's a protein because it matches the 2nd regex. Is there a way to prioritize a result ? Is there a way to proritize , something like "Don't try any other pattern if that one matches ? ".