Route
Last updated
Last updated
Router task is used to determine the next path. Router use JavaScript based expression. Expressions are defined per wired task to the router. The task connected to the expression which returns true is executed.
Router is connected to four nodes and only one node is executed, and it depends on the parameter #period#.
The routing determines the next path with these operations, regular expression, or function.
Equals/Greater/Less or equals/Equals or greater
Router compares the number values like this.
· 0001 is same as 1.
Double or single quotation is required for the comparison of string type.
· "0" is not same as "0000".
The value on the right is not necessarily a constant. It can be another parameter.
Router compares the string types with ascii values. Lowercase a (97) is higher that uppercase A (65). The expression a > A returns true.
Likewise, A (65) is higher than 0 (48). This expression returns true.
Exists
This operation is same as SQL like. If the left operand contains the right operand, it is true. If the left or right operand has quotation ? ', " -, those are removed before validation. This evaluation does not use JavaScript engine
These three A, 'A', "A" are same.
In
This operation evaluates with range of values. This operation uses start-end value format. For example, 1-9, A-F. This evaluation does not use JavaScript engine. There is no need of quotation for string type values.
If the value of #param# is D, this evaluation returns true.
If the value of #param# is 10, this evaluation returns true.
Matches
This operation evaluates with regular expression. This operation accepts the regular expression on the right operand.
This evaluation does not use JavaScript engine. There is no need of quotation for string type values.
Function
JavaScript function can be used for the evaluation. This function should return true or false.
The value on the right operand is not used.
Meta character | Description |
---|---|
^
Matches the starting position within the string. In line-based tools, it matches the starting position of any line.
.
Matches any single character (many applications exclude newlines, and exactly which characters are considered newlines is flavor-, character-encoding-, and platform-specific, but it is safe to assume that the line feed character is included). Within POSIX bracket expressions, the dot character matches a literal dot. For example, a.c matches "abc", etc., but [a.c] matches only "a", ".", or "c".
[ ]
A bracket expression. Matches a single character that is contained within the brackets. For example, [abc] matches "a", "b", or "c". [a-z] specifies a range which matches any lowercase letter from "a" to "z". These forms can be mixed: [abcx-z] matches "a", "b", "c", "x", "y", or "z", as does [a-cx-z].
The - character is treated as a literal character if it is the last or the first (after the ^, if present) character within the brackets: [abc-], [-abc]. Note that backslash escapes are not allowed. The ] character can be included in a bracket expression if it is the first (after the ^) character: []abc].
[^ ]
Matches a single character that is not contained within the brackets. For example, [^abc] matches any character other than "a", "b", or "c". [^a-z] matches any single character that is not a lowercase letter from "a" to "z". Likewise, literal characters and ranges can be mixed.
$
Matches the ending position of the string or the position just before a string-ending newline. In line-based tools, it matches the ending position of any line.
( )
Defines a marked subexpression. The string matched within the parentheses can be recalled later (see the next entry, \n). A marked subexpression is also called a block or capturing group. BRE mode requires \( \).
Matches what the nth marked subexpression matched, where n is a digit from 1 to 9. This construct is vaguely defined in the POSIX.2 standard. Some tools allow referencing more than nine capturing groups. Also known as a backreference. backreferences are only supported in BRE mode
*
Matches the preceding element zero or more times. For example, ab*c matches "ac", "abc", "abbbc", etc. [xyz]* matches "", "x", "y", "z", "zx", "zyx", "xyzzy", and so on. (ab)* matches "", "ab", "abab", "ababab", and so on.
{m,n}
Matches the preceding element at least m and not more than n times. For example, a{3,5} matches only "aaa", "aaaa", and "aaaaa". This is not found in a few older instances of regexes. BRE mode requires \{m,n\}.
?
Matches the preceding element zero or one time. For example, ab?c matches only "ac" or "abc".
+
Matches the preceding element one or more times. For example, ab+c matches "abc", "abbc", "abbbc", and so on, but not "ac".
|
The choice (also known as alternation or set union) operator matches either the expression before or the expression after the operator. For example, abc|def matches "abc" or "def".