PowerTip: Finding Letters in Strings with PowerShell
Summary: Learn four ways to use Windows PowerShell to find letters in strings.
I want to find out if a string contains the letter “m.” The string is stored in the variable $a as shown here:
$a=”northern hairy-nosed wombat”
Here are a variety of ways to accomplish this: