I want to know if a string contains one of abc , def , xyz , etc. I could do it like this:
$a.Contains("abc") -or $a.Contains("def") -or $a.Contains("xyz")
Well, this works, but I need to change the code if this list of tweaks changes, and the performance is poor because $a scanned several times.
Is there a more efficient way to do this with a single function call?
source share