have a question. So I have to compare between two array’s and remove a string that will always return a partial. EG:
Array1: John Smith, Jane Doe, Jerry Jacob
Array2: John S, Jane D, Jerry J
If Array1 contains array2, remove that entry.
I was attempting to use a Linq expression: Array1.Except(Array2).ToArray but this doesn’t work as it looks for an exact match. Thought maybe wild cards would work as well but no luck there either.
I was thinking of using something like Array.Exists but was unsure if that would work for this. Anyone have a solution for this?
if the second array values can always contain part of the values on the first, then you could just test each value inside a loop, just you cant remove items from arrays, then easier to create a list instead.
I have to compare names and one source gives full name, second source gives First name plus last initial. So it’ll always contain part of the values.
Apologies if it’s an ignorant question but how would I go about testing through a loop? And I would need to create a new array removing what was found correct? Don’t want to use list because it’ll have to “remember” it’s position at a later point in the automation.