Match TRCK and TPOS using regex and reduce code redundancy.
Use re named groups to match values and metadata keys.
Merge pull request #1 from zas/tpos_trck

@zas: Match TRCK and TPOS using regex and reduce code redundancy.

@sophist: I wondered whether this code was too difficult to read, but in the end decided it wasn't.