fix regex pattern for multiple capture

Since $1 $2 don't get reused on failed matches I ended up needing to use
named capture groups.