Like and not like

The -like and -notlike operators support simple wildcards. * matches a string of any length (zero or more) and ? matches a single character. Each of the following examples returns true:

'The cow jumped over the moon' -like '*moon*' 
'Hello world' -like '??llo w*' 
'' -like '*' 
'' -notlike '?*' 

Behind the scenes, PowerShell turns expressions used with -like and -notlike into regular expressions.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.172.68