$list filter

Allows you to filter a list with a regular expression.


Example

Running this code will add "1,2,3,4,5,6,7,8,9,0,a1,a2,a3,1a,2a,1a1,2a2" to the list named "%List1".

Running this code will filter out all strings that contains "a", and insert it to the list named "%List2".

This is shown in the debugger.

add list to list(%List1,$list from text("1,2,3,4,5,6,7,8,9,0,a1,a2,a3,1a,2a,1a1,2a2",","),"Delete","Global")
add list to list(%List2,$plugin function("Data and Files Automation.dll", "$list filter", %List1, "a", "Contains"),"Delete","Global")

Was this helpful?

Previous Article

$list except

Next Article

$list find duplicate