Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 597 Bytes

Not-match.md

File metadata and controls

55 lines (35 loc) · 597 Bytes

Not match is different than notmatch?

Obviously

-not $false

Which outputs True.

And:

-not $true

Which outputs False.

And obviously

"aabaa" -match "b"
# True

And of course:

-not "aabaa" -match "b"
# False

Em. I like it.

So I kept developing... And...

"aaaa" -match "c"

Which is False.

But:

-not "aaaa" -match "c"

Which is also False!?

So -not False is False?

What a strange behavior of PowerShell! 😲

Repro env: Windows 11, PowerShell Core 7.0.3