Skip to main content

ARRAY_FILTER

Arnaud Lachaume avatar
Written by Arnaud Lachaume
Updated this week

Type: Function

Function: ARRAY_FILTER

Syntax: ARRAY_FILTER(list, regex)

Description: Returns all values in a given list matching the provided regex. If a primitive value is given instead of a list, it is turned into a single-element list before being filtered (see third example).

Sample usage:

  • ARRAY_FILTER(label_names, "^bug-") will return all labels starting with bug-

  • ARRAY_FILTER(["bug","enhancement", "security "], "(bug|sec)") returns ["bug", "security"]

  • ARRAY_FILTER("foo_value", "^foo") returns ["foo"]

Did this answer your question?