Skip to main content

Match Regexp

Extract text using regular expressions. Supports capture groups: if the pattern contains a group like ([^]]+), returns the captured text. Returns an array of all matches. Use this instead of RunPython for text extraction.

Category: Data Processing & Transformation · Group: General · Activity name: Regex

The Regex activity in the designer

Example

matches = Regex("Order #(\\d+)", "Your Order #12345 is ready")

Inputs

NameTypeRequiredDefaultDescription
PatternstringYesThe regular expression pattern to search for in the text.
TextstringYesThe text in which to search for the pattern.

Outputs

NameTypeDescription
outputVariablearrayArray of matched strings. With capture groups, contains the captured text (e.g. pattern '(\d+)' on 'abc123' returns ['123']).