filter-list
Finds values in a list.
Finds values in a list that match a search string or regular expression.
Arguments
Inputs:
list
: The list to be searched and filtered.
pattern
: A string or a regular expression to be searched for within the list. Regular expressions must be wrapped with / character (e.g. /.*/)
Output:
values
: A list of the elements in the input list that match the testing pattern. This will be empty if there are no matches.
complementary
: A list of the elements in the input list that do not match the testing pattern. This will be empty if the input elements all match the testing pattern.
Last updated
Was this helpful?