The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=13792
======================================================================
Reported By: mwoehlke
Assigned To:
======================================================================
Project: CMake
Issue ID: 13792
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2012-12-13 16:26 EST
Last Modified: 2012-12-13 16:26 EST
======================================================================
Summary: REGEX REPLACE fails if () capture is empty
Description:
string(REGEX REPLACE) fails for certain patterns with 'matched an empty string'
error if a capture grood is empty, even if the full match is non-empty.
Steps to Reproduce:
set(input foo)
string(REGEX REPLACE "^([^.]*)(\\..*)?$" "\\1" output ${input})
Additional Information:
CMake is correctly matching the regular expression (as can be seen by examining
the captures), and the overall pattern (which is the old text to be replaced) is
non-empty, so there should be no problem. (Even more interestingly, while the
above pattern triggers the problem, other patterns which one might expect to
tickle the same glitch do not.)
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-12-13 16:26 mwoehlke New Issue
======================================================================
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers