JSRegEx::Exec (open)
Search the next match of the regular expression within an input string
Syntax
LOADLIB "wh::regex.whlib";
RECORD ARRAY FUNCTION Exec(STRING input)
Parameters
STRING input
Input to search a match in
Return value
RECORD ARRAY
Details about the match. First record describes the entire match (if found), further records describe the subexpression matches for every subexpression in the regular expression.
INTEGER len
Length of the match
BOOLEAN matched
For the first record, if the match was a full match (instead of a partial match), For the nth (n>=1) record whether subexpression n participated in the match.
INTEGER start
Start of the match (-1 if not matched)
STRING value
Matched part of the string