-not $false
Which outputs True
.
And:
-not $true
Which outputs False
.
"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