bah. optional parts of the regular expression were screwing things up.