[parser] Use regexes when matching version (#4)