Skip to content

Tag: <testRe> - Test for a regular expression match

Definition

The <testEq> tag is used to compare the current value of a named parameter to a given regular expression.

As regular expressions can add complexity, if you need to perform a simple string match, then consider using the <testEq> tag Tag: <testreq>.

This tag has the following attributes:

Parameters

  • name (str): The name of the parameter whose current value is to be checked.
  • value (str): This is the regular expression to be used to check the parameter value.

For more info and some examples of Regular Expression used within Osirium PAM, see Regular expressions.

Example

To perform a specific command only when the version parameter matches: 10.0 or 10.1 or 10.2, then use could the following:

1
2
3
4
5
   <command>...
      <conditions>
         <testRe name='version' value='10\.[012]'/>
      </conditions>
   </command>

Note

The regular expression to match 10.0 or 10.1 or 10.2 is: 10\.[012]

Parent Tags

Child Tags

  • None