Factor regex error messages with spec API tests
Merge pull request #8251 from cirosantilli/factor-regex-message-spec

Factor regex error messages with spec API tests