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
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 character of after substring. If the node does not find a match, this output returns -1.
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.
Characters in UTF-8 can be multiple bytes so string nodes count the number of characters in a string instead of jumping to a point in memory. Since the length and offset parameters are in units of characters, avoid nesting this node with large strings because that can create exponential functions that carry a higher performance burden.
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: DAQExpress does not support FPGA devices
Web Server: Supported in VIs that run in a web application