Help: Fix typo in example of CMP0186

For CMake 4.1 and above the result of

    string(REGEX REPLACE "^a" "b" result "aaaa")

is `"baaa"`, not `"abbb"`.
This commit is contained in:
Julien Jorge
2026-06-04 08:23:03 +02:00
committed by Brad King
parent ee5b5addee
commit 01c8417cd2

View File

@@ -27,7 +27,7 @@ at the start of the input string:
.. code-block:: cmake
string(REGEX REPLACE "^a" "b" result "aaaa") # result="abbb"
string(REGEX REPLACE "^a" "b" result "aaaa") # result="baaa"
string(REGEX MATCHALL "^a" result "aaaa") # result="a"
This policy provides compatibility for projects that have not been updated.