Taken from www.w3schools.com:
The Filter function returns a zero-based array that contains a subset of a string array based on a filter criteria.
Note: If no matches of the value parameter are found, the Filter function will return an empty array.
Note: If the parameter inputstrings is Null or is NOT a one-dimensional array, an error will occur.
Syntax
Filter(inputstrings,value[,include[,compare]])
'Filter items that contain ''S''
a=Array(''Sunday'',''Monday'',''Tuesday'',''Wednesday'',''Thursday'',''Friday'',''Saturday'')
b=Filter(a,''S'')
for each x in b
response.write(x & ''
'')
next
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Output values are:
Sunday
Saturday
'Filter items that do not contain an ''S'' (include:=False)
a=Array(''Sunday'',''Monday'',''Tuesday'',''Wednesday'',''Thursday'',''Friday'',''Saturday'')
b=Filter(a,''S'',False)
for each x in b
response.write(x & ''
'')
next
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Output values are:
Monday
Tuesday
Wednesday
Thursday
Friday