Why does Powershell -match any string with $null -


found while debugging powershell script.

ps c:\temp> "hello" -match $null   true   

but

> "hello" -eq $null returns false 

why, when using -match, string match $null?

i believe because $null gets coerced empty string -match expects string pattern on rhs (right hand side). , empty string match anything.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -