MAXIMAL in effect, it will successfully match
only if the whole string matches.
With option MINIMAL in effect, any successful match will
always start at the first character of string,
but doesn't necessarily have to cover the full string.
Thus a match will always be a leading part of string.
match returns 0 for an
unsuccessful match and 1 for a successful match.
str = "<p>Paragraph 1</p><p>Paragraph 2</p>"
re1 = .RegularExpression~new("<p>?*</p>", "MINIMAL")
re1~match(str)
re2 = .RegularExpression~new("<p>?*</p>", "MAXIMAL")
re2~match(str)
say "re1 (minimal) matched" str~substr(1, re1~position)
say "re2 (maximal) matched" str~substr(1, re2~position)
::requires "rxregexp.cls"
re1 (minimal) matched <p>Paragraph 1</p> re2 (maximal) matched <p>Paragraph 1</p><p>Paragraph 2</p>