I need help filtering a big .CSV file for which a certain row must only contain strings from a predetermined set of strings held in a array returned by another Powershell function.
For example, suppose I have the following to filter:
datastore3
datastore1 vl_datastore2 datastore3
datastore1 vl_datastore2 datastore3
datastore1 datastore3
with the following array of strings through which I must discard any bad row:
datastore1 datastore3 (datastore1 in index 0, datastore3 in index 1)
In other words, my function should automatically get rid of any row that has the "vl_datastore2" substring in it, therefore only the first and last row would remain.
How can I go about this? For now I am able to split the rows to filter into an array of strings ("datastore1 vl_datastore2 datastore3" would thus be an array with 3 strings in it),but I'm having trouble finding the correct way to use any Powershell operator to filter my list correctly.
Thanks in advance!