I have a list of "file names" and I want to create a sub-list of only those that their names contain/end in "_2020". I am using a Regex to select for those files: "_\d{4}". However I am getting a "Not Enough Arguments" error.
If I test the ListIDs I get the expected list of file names, it is not empty. I will Appreciate any pointers on how to fix my script.
The log error is: not enough arguments in access or evaluation of 'Contains' , Contains/*###*/(Regex( Char( ListIDs[i] ), "_\d{4}" ))
Show (ListIDs);<BR />ListIDs = {"2020-06","practice", "file1_2020", "file2_2020"}<BR /><BR />SelectedIDs = {};
For (i = 1, i <= N Items (ListIDs), i++,
If (Contains(Regex(Char(ListIDs[i]), "_\d{4}")),
Insert Into (SelectedIDs, i);
);
);
N Items (SelectedIDs);
Print(SelectedIDs);