Method RegEx():getMatchText() Foundation
Gets the matched text from a match result.
:getMatchText( <aMatch>, [<nGroup>] ) --> cString
A string with the matched text, or the empty string ("") no match was found.
Helper class method to safely extract the matched text from a match result array. Handles array bounds checking and type validation.
Get match text
aMatch := oRegEx:match("Name: John")
? RegEx():getMatchText(aMatch) // Full match
? RegEx():getMatchText(aMatch, 1) // First capture group
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.