2,187
edits
(→Datetime: Re-ordered sections) |
(→Strings: Added .Contains) |
||
Line 179: | Line 179: | ||
<br>'''Match (basic)'''<br> | <br>'''Match (basic)'''<br> | ||
To do a basic | To do a basic search/match... | ||
<source lang="powershell"> | |||
if ($res.Contains("Success")) { | |||
# String did contain | |||
} else { | |||
# Didn't | |||
} | |||
</source> | |||
...which is much preferable to... | |||
<source lang="powershell"> | <source lang="powershell"> | ||
if ($res.CompareTo("Success")) { | if ($res.CompareTo("Success")) { |