I think there's someway that might be broken, though, if I remember my reading on regexes... but if you chomp everything right, I think it will accomplish the same thing (with the added benefit(?) of placing exactly what it matched in $1).
Your code only happens to do the right think if $key
equals ID, or it's different from any of the clauses.
It'll fail to work when the key equals TITLE, GENE,
CYTOBAND, LOCUSLINK, CHROMOSOME,