Switch Statement with Wildcard Parameter

suggest change

-Wildcard compares the value with each condition as a wildcard pattern. * is any run of characters, ? is one character, and [...] is a character set. Every matching condition runs.

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'}
}
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