Error in if.. with regular Expression

Hi
I want to use if … then with a regular expression.
I can run the test that u sent FilesetExample.fbz6.zip.
The example works fine, but there is a problem when I try such an expression inside my script.BTW if I try just .* it works, but when I add more things it fails like this:


Expression:
If ( %TEMP_STRING_3% matches RegExp .\bin\. )
Expanded Values:
Error expanding Term 1 left hand value : Variable : CurrentSolutionConfigurationContents - does not exist!

Thanks
Daphna Levin

Hi Daphna,

What is the value and the type of the variable ‘%TEMP_STRING_3%’? From the error it look’s like it’s a macro variable and it references the unused variable ‘%CurrentSolutionConfigurationContents%’.

Regards,
Paul.

%TEMP_STRING_3% Is a String Variable that I use. (It Contains the output of the action MsBuild Project- The outPut that I Want to process)
The variable '%CurrentSolutionConfigurationContents% is not mine.
As I mentioned before, it worked when the Regular expression is .* But when I try something more complex I get this error. So the problem is probably the interaction with the action – MsBuild Project.
Thanks Daphna

Hi Daphna,

You’ll need to use %!TEMP_STRING_3% instead of %TEMP_STRING_3% in the If…Then action so that it’s not recursively expanded. This will prevent the action from attempting to expand all the variables within the TEMP_STRING_3 variable.

Regards,
Paul.

Thanks, it solved the problem.
BTW - is there a Help section where this is explained??

Daphna

Here’s the relevant help section: https://www.finalbuilder.com/finalbuilder/Help/HTML/escaping_variable_contents.htm