# RegExpMatch

`import { RegExpMatch } from "destack:regexp";`

One regular expression match.

```ds title="RegExpMatch"
export struct RegExpMatch {
    text: string;
    captures: readonly (string | undefined)[];
    groups: RegExpGroups;
    index: float64;
    input: string;
    indices: RegExpIndices;
}
```

[language/library/src/regexp/regexp.ds:36:54](https://github.com/destack-sh/destack/blob/main/language/library/src/regexp/regexp.ds#L36-L54)

## Members

### `text: string`

The full matched text.

### `captures: readonly (string | undefined)[]`

The matched captures.

### `groups: RegExpGroups`

The named captures.

### `index: float64`

The start index in UTF-16 code units.

### `input: string`

The searched input string.

### `indices: RegExpIndices`

The match spans produced by the `d` flag.
