MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0014336 | CMake | CMake | public | 2013-08-03 02:18 | 2016-06-10 14:31 | |||||
Reporter | irwin | |||||||||
Assigned To | Kitware Robot | |||||||||
Priority | normal | Severity | minor | Reproducibility | always | |||||
Status | closed | Resolution | moved | |||||||
Platform | Linux | OS | OS Version | Debian Wheezy | ||||||
Product Version | CMake 2.8.11.2 | |||||||||
Target Version | Fixed in Version | |||||||||
Summary | 0014336: REGEX REPLACE does not give correct results for a left anchor (^) combined with careted brackets | |||||||||
Description | # Test code to show the issue. set(filename "whatever") string(REGEX REPLACE "(^[e])" "/\\1" CATALOG_filename "${filename}") message(STATUS "filename=${filename}") message(STATUS "CATALOG_filename=${CATALOG_filename}") string(REGEX REPLACE "(^[^e])" "/\\1" CATALOG_filename "${filename}") message(STATUS "filename=${filename}") message(STATUS "CATALOG_filename=${CATALOG_filename}") The first REGEX REPLACE gives a correct result (no match because of the anchor so no replacement is done) while the second REGEX REPLACE produces an incorrect result (anchor ignored until the "e" is hit in whatever). | |||||||||
Steps To Reproduce | Run the above code using cmake -P. The results are -- filename=whatever -- CATALOG_filename=whatever -- filename=whatever -- CATALOG_filename=/w/h/a/tever That last one should be -- CATALOG_filename=/whatever because the anchor should limit the match to just the first character (so long as that first character is not an "e" as in this case) so the "/" should be prepended only to the first character. | |||||||||
Additional Information | ||||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | ||||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2013-08-03 02:18 | irwin | New Issue | ||||||||
2014-07-03 09:24 | Brad King | Relationship added | related to 0015004 | |||||||
2016-06-10 14:29 | Kitware Robot | Note Added: 0042342 | ||||||||
2016-06-10 14:29 | Kitware Robot | Status | new => resolved | |||||||
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved | |||||||
2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot | |||||||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|