February 2019
Intermediate to advanced
626 pages
15h 51m
English
The -match and -notmatch operators return true or false when testing strings:
'The cow jumped over the moon' -match 'cow' # Returns true 'The cow' -match 'The +cow' # Returns true
In the preceding example, the + symbol is reserved; it indicates that The is followed by one or more spaces before cow.
In addition to returning a true or false value about the state of the match, a successful match will add values to a reserved variable, $matches. For example, the following ...
Read now
Unlock full access