#SwitchContinue.ps1 $var="PowerShell123","PowerShell","123","PowerShell 123" Switch -regex ($var) { "\w" {write-host $_" matches \w" ; continue} "\d" {write-host $_" matches \d" ; continue} "\s" {write-host $_" matches \s" ; continue} Default {write-host "No match found for"$_ ; } }