[refactor] regex spec to have capture keys