on-internet
← Community

Powershell .contains() check without casesensitive

Stack Overflow ·

I'm having a larger foreach loop code but need to get below code executed without casesensitive. Below code snippet returns false, how can I ignore the casesensitive .contains() and the condition as true? $a='aa0855' $b='AA0855 Sample' $b.Contains($a) Expected value is true. Above code is tried with 2 variables and it returns false.

Comments

Sign in or sign up to comment and upvote.

No comments yet.