title: Cast [regex] in PowerShell results in case sensitivity strangeness - why?
body: <p>I'm new to PowerShell scripting, and I am puzzled by some behaviour I have encountered.</p>
  <p>I have been following examples to learn how to use matching and had seen some examples where [regex] was put in front of a string. I had assumed (perhaps wrongly) that this is a cast, explicitly specifying that the object is a regular expression. But it seems that using [regex] changes the case sensitivity of the resulting match:</p>
  <pre><code>PS &gt; $array = 'ABC','DEF','GHI'
  PS &gt; $array -match 'DEF'
  DEF
  PS &gt; $array -match 'def'
  DEF
  PS &gt; $array -match [regex]'def'
  PS &gt; $array -match [regex]'DEF'
  DEF
  </code></pre>
  <p>What is actually going on, here? What is the [regex] doing, that results in case sensitivity?</p>