title: Pass regex options to PowerShell [regex] type
body: <p>I capture two groups matched using the regexp code below:</p>
  
  <pre><code>[regex]$regex = "^([0-9]{1,20})(b|kb|mb|gb|tb)$"
  
  $matches = $regex.match($minSize)
  
  $size=[int64]$matches.Groups[1].Value
  $unit=$matches.Groups[2].Value
  </code></pre>
  
  <p>My problem is I want to make it case-insensitive, and I do not want to use regex modifiers.</p>
  
  <p>I know you can pass regex options in .NET, but I cannot figure out how to do the same with PowerShell.</p>