[CMake] regex first subfolder

Anton Sibilev anton.sibilev at gmail.com
Mon Dec 26 05:52:51 EST 2011


Hello! Can you, please, help me with regex?

I have the string, for example, "aaa111/bbb222/ccc333".
As the result of regex I want to get "aaa111", but I can't set proper
expression..

string (REGEX REPLACE "^(.*/)?" "" folder ${folder}) ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20111226/2339d361/attachment.htm>


More information about the CMake mailing list