[CMake] string replace first occurrence of a period using regex

Mikael Sundell mikael.sundell at gmail.com
Sat Dec 15 04:43:43 EST 2012


First, thanks for cmake!
In cmake, how can I easily replace the first period "." in a string with a
substitute using regex and string replace?
For example:
  z
  z.1
  z.1.2.5
With replacement ".so", "." becomes ".so" as in:
  z.so
  z.so.1
  z.so.1.2.5
My regex is improving but not fast enough :)
Thanks,
Mikael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121215/11ca7f65/attachment.htm>


More information about the CMake mailing list