[CMake] Fw: STRING - REGEX REPLACE use

Troels Frimor troels at in.tum.de
Wed Dec 8 13:52:02 EST 2004


Hi again,

I think that if it is asking for a sixth parameter, it could be caused 
by your 'var_in' parameter is empty. That is, if it is a variable that 
has never been set, since the STRING REPLACE can also take empty strings.

With regards,
Troels

Benoit Regrain wrote:
> Hi,
> Thanks Troels,
> 
> But CMake say me that it needs 6 arguments for STRING(REGEX REPLACE
> What must be this the 6th parameter ?
> 
> My CMake version is : CMAKE 2.0 patch 5
> Benoit
> 
> ----- Original Message ----- 
> From: "Troels Frimor" <troels at in.tum.de>
> To: "Benoit Regrain" <benoit.regrain at creatis.insa-lyon.fr>
> Cc: <cmake at www.cmake.org>
> Sent: Wednesday, December 08, 2004 11:04 AM
> Subject: Re: [CMake] Fw: STRING - REGEX REPLACE use
> 
> 
> 
>>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