Skip to main content

RegexExtractTask

Find and extract text using regular expressions from the previous task’s output.

Input: String output from previous task

Returns: The matched string based on the regex pattern and group number

Example: Extract the first number from a string

{
"regexExtractTask": {
"pattern": "\\d+",
"groupNumber": 0
}
}

Example: Extract text between quotes

{
"regexExtractTask": {
"pattern": "\"([^\"]+)\"",
"groupNumber": 1
}
}

Example: Extract the first JSON object from a stream

{
"regexExtractTask": {
"pattern": "\\{[^}]+\\}"
}
}


Fields

NameTypeDescription
 groupNumber

int32

The capture group number to extract (0 returns full match, 1+ returns respective capture group). / Defaults to 0 if not specified.

 pattern

string

The regular expression pattern to match against the input string. / Uses the fancy-regex Rust crate syntax.