filter
Type: Function · Category: popular
Filters an array by regex or condition.
Note that if a condition is specified as well as a regex then only the condition is applied.
Examples
filter(list=["AA", "AB", "BA", "BB"], regex="^A") -> ["AA", "AB"]
filter(list=[1, 2, 3, 4, 5, 6], condition="x=>x > 3") -> [4, 5, 6]
| Argument | Type | Description |
|---|---|---|
list |
list of Any (required) | A list of items to filter |
regex |
string | A regex to test each item |
condition |
vfilter.Lambda | A VQL lambda to use to filter elements |
Platforms: macOS, Linux, Windows