Method RegEx():quickMatch() Foundation
Performs a one-time pattern match.
:quickMatch( <cPattern>, <cSubject> ) --> aMatch
An array with match results. The match results are returned in an array of the same format as returned by the method :match(). See there for a detailed description. Also see the helper methods :getMatchText(), :getMatchPos() and :getMatchRange() which simplify the processing of the match results.
Convenience class method for performing a single match operation without having to first create a persistent RegEx object. Ideal for one-off matches where pattern reuse is not needed.
Get match text
aMatch := RegEx():quickMatch("\d+", "Version 2.5")
? RegEx():getMatchText(aMatch) // "2"
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.