mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 04:40:18 -05:00
5d039f3be3
When doing successive matches, track the input start and current search start positions separately to prevent the `^` anchor from matching in the middle of the string. Add policy CMP0186 to provide compatibility. Issue: #26629 Fixes: #16899
13 lines
328 B
Plaintext
13 lines
328 B
Plaintext
^matches: Some::
|
|
results from: string\(REGEX MATCHALL\)
|
|
CMAKE_MATCH_0: -->Some::<--
|
|
CMAKE_MATCH_1: -->Some<--
|
|
CMAKE_MATCH_2: -->::<--
|
|
CMAKE_MATCH_COUNT: -->2<--
|
|
replace: \[Some\]Scope
|
|
results from: string\(REGEX REPLACE\)
|
|
CMAKE_MATCH_0: -->Some::<--
|
|
CMAKE_MATCH_1: -->Some<--
|
|
CMAKE_MATCH_2: -->::<--
|
|
CMAKE_MATCH_COUNT: -->2<--$
|