Use different Regex group capturing strategy

Apparently, the $matches variable was being overriden by AppVeyor.