Regular Expression
The Regular Expression action tests an input string for a match to a regular expression.
Parameter descriptions
Use the Expression parameter to enter
the expression to compare.
For a list of specific syntax rules for regular
expressions, refer to:
http://www.w3.org/TR/xmlschema-2/#regexs
Characters not supported - Do not use the ^ (caret) and $ characters in a regular expression.
Input tab
Parameter | Description |
---|---|
Column | Description |
Name | This column provides the Input variable used for testing. |
Logical | By default, the input variable for a regular expression has the data type STRING (0). |
Count | Indicates the quantity of the value is always a single integer. Thus, Count will always be one. |
Value | The trigger variable whose value to
use to compare against the
expression. Click the Value column to select from a list of device variables, or a user defined local or static variable. You can also specify a macro or constant. |
Type | When you specify Value, the data type of variable is automatically added to the Type column. If you select String, you must specify the length of the string. |
Example Regular Expression
The following shows an example Regular Expression.
When the trigger executes, the expression is interpreted
as:
. | Matches any character except a new line. |
*** | Causes the regular expression to match 0 or more repetitions of the preceding regular expression, or as many repetitions as are possible. |
\ | Escapes the special characters that follow. |
The Input tab shows the value of the string to match as a constant. The string to look for is: Thi..s is a test
Routing tab
Parameter | Description |
---|---|
True | The route to take when the
expression evaluates to True. |
False | The route to take when the expression evaluates to False. |
Failure | The route to take if there is a failure. |