I have an array with Strings, let´s say
$data = @(
"Haus",
"Maus",
"Laus",
"Schnitzel",
"Elefant"
)
I want to check it against multiple Regex from an array.
$regexChecks = @(
".*aus.*",
".*fant.*"
)
I tried something like this
$test = $data |? {$regexChecks -notmatch $_}
Write-Host $test
I expect only the String "Schnitzel" as output.