REGEX_EXTRACT

Returns an array of all the regex matches on the input text.

Optionally, include a string containing Ruby modifiers – e.g. i for case insensitive mode.

Syntax 

REGEX_EXTRACT(text, regex, [modifiers])

Usage examples 

Example 1

Input

1
{
2
"my_action": {
3
"message": "The quick brown fox jumps over the lazy dog. It barked."
4
}
5
}

Formula

REGEX_EXTRACT(my_action.message, "[A-Z]")

Output

1
[
2
"T",
3
"I"
4
]

Example 2

Input

1
{
2
"example": "hello & HELLO"
3
}

Formula

REGEX_EXTRACT(example, "hello", "i")

Output

1
[
2
"hello",
3
"HELLO"
4
]

Example 3

Input

1
{
2
"description": "A more complex example that also extracts the first match and pipes it further to a down case function.",
3
"my_action": {
4
"message": "This is an automatically generated message from Tines"
5
}
6
}

Formula

REGEX_EXTRACT(my_action.message, "(?<=This is)(.*)(?=generated)")[0][0] |> UPCASE(%)

Output

" AN AUTOMATICALLY "

Sample Actions 

Transform
My Action
Transform
REGEX_EXTRACT

Select an action to inspect.

You can also click "Copy actions" and paste them in your Tines story to see how they work.

Transform
My Action
Transform
REGEX_EXTRACT

Select an action to inspect.

You can also click "Copy actions" and paste them in your Tines story to see how they work.

Was this helpful?