In the above example, the character ‘o’ in the range of so the above output is true. If found, returns the True value and otherwise return a false value. When the wildcard character is used with a dash (‘-‘), it matches the range of characters from the string. Wildcard ( – Square brackets) used to match the specific characters or the range of characters. "PowerShell","Azure","Insight" -notlike "*Sh*" "PowerShell","Azure","Insight" -like "*Sh*" If there is more than one string as an input value then it returns the matching value from the input string. The above examples are for a single input string. NotLike operator will give the contrary output. When a keyword is added between the two wildcard characters (*), it checks if the keyword is part of the input string.
0 Comments
Leave a Reply. |