string(REGEX MATCH): Restore reporting of matches with semicolons

This was broken by refactoring in commit dab5e6ebb1 (introduce
cm::CMakeString class as helper for string() command, 2025-10-06,
v4.3.0-rc1~510^2~2).

Fixes: #27749
3 files changed