Switch Statement with Wildcard Parameter

suggest change

The -Wildcard parameter allows switch statements to perform wildcard matching against conditions.

Example:

switch -Wildcard ('Condition')
{ 
    'Condition'           {'Normal match'}
    'Condit*'             {'Zero or more wildcard chars.'} 
    'C[aoc]ndit[f-l]on'   {'Range and set of chars.'}  
    'C?ndition'           {'Single char. wildcard'}
    'Test*'               {'No match'} 
}

Output:

Normal match
Zero or more wildcard chars.
Range and set of chars.
Single char. wildcard

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents