interface RegExResult {
    match: string;
    groups: string[];
    index: number;
    named: NamedGroup;
}

Properties

Properties

match: string

The string that matched the Regular Expression

groups: string[]

An array of values from capture groups in the Regular Expression. If a capture group did not match its value is undefined.

index: number

The zero-based index of the string tested where the matched regular expression began

named: NamedGroup

An object with (key => values) consisting of (named capture group name => capture group value)