DSP regular expressions (ifvar matches)

Example

VALUE = A OR B

%ifvar VALUE matches (‘[AB]’)%

% endifvar%

Does not work

Thank you

Hi Gianni,

here is the correct Syntax for %ifvar%:

I have found this in the DSP Developers Guide.

Regards,
Holger

Thanks Holger

I read the manual but I don’t understand how the work option.

Example:

The value of the Variable can be ‘L’ or ‘P’

%ifvar Variable equals (‘L’) equals (‘P’)%

% endifvar%

How do I check the double condition?

Hi

Gianni

Hi Gianni,

can you try the following:


%ifvar Variable matches(‘L|P’)%
Block of Code
%end%

Regards,
Holger

Hi Holger

I tried but not working.

%ifvar L_Notifica_NSVDOutput/results[0]/COD_STATO matches(‘L|P’)%
Block of Code
%end%

While it works

%ifvar L_Notifica_NSVDOutput/results[0]/COD_STATO matches(‘L’)%
Block of Code
%end%

or

%ifvar L_Notifica_NSVDOutput/results[0]/COD_STATO matches(‘P’)%
Block of Code
%end%

Gianni

Good question, never notice this before.
Just checked the code in webMethods, it doesn’t really support regular expression.
It just uses * and ? as kind of wild card.

I tried to patch it, and made it support regex now.