Fix major capturing group regression

Closes #31