[CMake] Fw: STRING - REGEX REPLACE use
Troels Frimor
troels at in.tum.de
Wed Dec 8 05:04:39 EST 2004
Hi,
I would expect you could do something like:
STRING(REGEX REPLACE
"(.*)FileSeq0(.*)"
"\\1FileSeq%d\\2"
Var_out
${var_in})
Where the first 2 middle parameters is the replacement regular
expressions, and the second to last is where it gets stored, and last is
the variable with your input, in this case:
"SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm"
regards,
Troels
Benoit Regrain wrote:
> Hi,
>
> Anyone could explain me how to use the STRING command with the
> REGEX REPLACE parameter
>
> CMake request me 6 parameters but I don't understand want I must set.
>
> What I want exactly to do :
> I have a file like SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm
> And I would have SIEMENS_MAGNETOM-12-MONO2-FileSeq%d.dcm
> The idea might be to replace the 'FileSeq0' by FileSeq%d'
>
> Cheers
>
> -----------------------------------------------------------------
> Benoit Regrain
> Ingénieur d'études CNRS (Creatis)
> email : regrain at creatis.insa-lyon.fr <mailto:regrain at creatis.insa-lyon.fr>
> phone : (+33) (0) 4.72.43.82.58
> fax : (+33) (0) 4.72.43.85.26
> INSA - Bâtiment Blaise Pascal
> 7, avenue Jean Capelle
> F - 69621 Villeurbanne Cedex
> -----------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> CMake mailing list
> CMake at www.cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
More information about the CMake
mailing list