Skip to main content

$matchRegex

Finds the first match of a regular expression pattern in a string.

Parameters

ParameterDescription
textThe text to search
regexThe regular expression pattern to match
flagsOptional. Flags for the regular expression

Example

<AoiClient>.addCommand({
name: "find-regex-match",
code: `
$matchRegex[Hello, world!;[A-Za-z]+]
`,
});