Searches for a pattern of characters in a string as specified by a limited set of regular expressions.
If this node finds a match, it splits the input string into three substrings: the string that appears before the match, the match itself, and the string that appears after the match.
This node performs more quickly than Match Regular Expression but gives you fewer options for matching strings. For example, Match Pattern does not support the parenthesis or vertical bar (|) characters.
The input string to search.
The pattern for which you want to search in the input string. This input is limited to the following regular expression characters: . (period), *, +, ?, [], ^, $, \, \b, \f, \n, \s, \r, \t, and \xx. Furthermore, this input does not support character grouping, alternate pattern matching, backreferences, or non-greedy quantification.
Definitions of Special Characters
The number of bytes into the input string at which this node begins its operation.
The offset of the first byte in the input string is 0. If offset is beyond the end of the input string, this node returns an empty string.
Strings are encoded in UTF-8. For strings containing characters in the U+0000 through U+007F range, the number of bytes in a string is equivalent to the number of characters. However, for strings containing the characters U+0080 through U+7FFFFFFF, the number of bytes is greater than the number of characters.
Default: 0
A string containing all the characters in the input string that occur before the match.
First string after the offset that matches the pattern specified by the regular expression.
String containing all characters in the input string that follow the match.
The index in the input string of the first byte of after substring. If the node does not find a match, this output returns -1.
Strings are encoded in UTF-8. For strings containing characters in the U+0000 through U+007F range, the number of bytes in a string is equivalent to the number of characters. However, for strings containing the characters U+0080 through U+7FFFFFFF, the number of bytes is greater than the number of characters.
If the node does not find regular expression, match substring is empty, before substring is the entire string, after substring is empty, and offset past match is -1. Match Pattern is compatible with a limited set of regular expressions and does not support character grouping, alternate pattern matching, backreferences, or non-greedy quantification. You can use a specific set of special characters to refine the search.
string | regular expression | offset | match | offset past match | Comments |
---|---|---|---|---|---|
cdb | b* | 0 | "" | 0 | The offset input and the offset past match output might be equal when the empty string is a valid match for the regular expression. |
bbbcd | b* | 0 | bbb | 3 | Notice that offset does not equal offset past match because a longer match than the empty string existed. |
Where This Node Can Run:
Desktop OS: Windows
FPGA: This product does not support FPGA devices
Web Server: Supported in VIs that run in a web application