Refactor CppCMS regex with non-capturing group