The Regex.Match value type represents a single match from a regular expression.

property Bool isValidread only

True if the match is valid, false otherwise.

property String stringread only

The matching sub-string.

property Int startread only

The start offset of the matching sub-string within the original text.

property Int lengthread only

The length of the matching sub-string.

property Array<Regex.Group> groupsread only

An array of the captured groups within the expression. The first captured group, groups[0], is always the entire match followed by each group specified in the original regular expression.

if var m = />>(\d+)<</.match("result >>109<<") {
    System.log(m.groups[0].string) // ">>109<<"
    System.log(m.groups[1].string) // "109"