Method RegEx():setUngreedy() Foundation
Sets ungreedy (lazy) quantifier mode.
:setUngreedy( [<lUngreedy>] ) --> self
This method returns self.
In ungreedy mode, quantifiers like * and + become lazy by default, matching as few characters as possible. Normal greedy behavior can be restored for individual quantifiers by following them with ?.
Set ungreedy mode
oRegEx := RegEx():create("<.*>"):setUngreedy()
aMatch := oRegEx:match("<b>text</b>")
? RegEx():getMatchText(aMatch) // "<b>" (not "<b>text</b>")
oRegEx:destroy()
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.