Skip to main content

MatchRegexV2

This Script is part of the Common Scripts Pack.#

Extracts regex data from a given text. This supports groups and looping as well.

Script Data#


NameDescription
Script Typepython3
TagsUtility

Inputs#


Argument NameDescription
dataThe text date to extract the regex from.
regexThe regex to match and extract. Take into account that data taken from context data contains special characters which are not visible, such as \n and \b.
groupThe matching group to return. If nothing is provided the full match will be returned. The group value should start at 1.
contextKeyThe context key to populate with the result.
flagsThe regex flags to match. The default is "-gim".

Outputs#


PathDescriptionType
MatchRegex.resultsList of Regex matchesstring