34,333
edits
Changes
→Wildcards, Regular Expressions and Case Sensitivity in switch Statements
Another powerful feature of the Windows PowerShell ''switch'' statement involves the ability to use wildards and regular expressions (regex) when performing matches.
When using wildards, the ''-wildardwildcard'' option must be passed through the switch statement. The following example demonstrates the use of wildcards when seeking a match to a particular value in a switch statement:
<pre>