Owning Class: string
Requires: MathScript RT Module
m = regex(a, format)
m = regex(a, format, 'once')
[m, n] = regex(a, format)
[m, n] = regex(a, format, 'once')
Legacy Name: regexp
Performs a case-sensitive search for a regular expression in the input string a and returns the first and last indexes of the matched strings.
| Name | Description |
|---|---|
| a | Specifies the string to search. |
| format | Specifies the pattern for which you want to search in a. format is case sensitive. |
| 'once' | Directs LabVIEW to return the first and last indexes of only the first matched string. |
| Name | Description |
|---|---|
| m | Returns the first indexes of all matched strings. If you specify 'once', m returns the first index of the first matched string. |
| n | Returns the last indexes of all matched strings. If you specify 'once', n returns the last index of the first matched string. |
a = 'Run regex in LabVIEW MathScript';
format = 'L[a-zA-Z]+W';
[m, n] = regex(a, format)