Returns the length of the last pattern match found.
| Category: | Regular Expression |
| Interaction: | This function operates on the pattern match substring found using FINDFIRST( ) or FINDNEXT( ). |
| Returned data type: | Integer |
// Define some variables
integer i
string MyString
//Supply some values for the variables
i = 0
MyString = "DataFlux"
// Uncomment the line below to see the value of variable i change
//MyString = "Data_Management_Studio"
//You must define a regex object
regex r
//Then compile your regular expression.
// This expression will match as many "word" characters as it can
// (alphanumerics and undescore)
r.compile("\w*")
// If a pattern match is found then set i to show the length of
// the captured substring
if r.findfirst(MyString) then i = r.matchlength()
// Terminate the expression node processing
seteof()