I was just stunned by the fact CMake does not support non-capture groups. Please add it.
CMake’s regular expression engine is old. There is discussion to replace it, but it is not easy.