title: Powershell | Where-object Function Problem
body: <p>I have got a problem with Where-object function in Powershell.</p>
  <pre><code>Get-ChildItem &quot;$CurrentPath\TEMP&quot;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/qEFhB.png" rel="nofollow noreferrer">Result</a></p>
  <p>When I try to do a search on the name object, this is the result:</p>
  <pre><code>Get-ChildItem &quot;$CurrentPath\TEMP&quot; | Where-Object {$_.Name -match &quot;[Erai-raws] B&quot;}
  </code></pre>
  <p><a href="https://i.stack.imgur.com/QnYBX.png" rel="nofollow noreferrer">Result</a></p>
  <p>There must be some problem with the &quot;[]&quot; characters, if I do the same search with this I get a result:</p>
  <pre><code>Get-ChildItem &quot;$CurrentPath\TEMP&quot; | Where-Object {$_.Name -match &quot;[Erai-raws] &quot;}
  </code></pre>
  <p><a href="https://i.stack.imgur.com/qWD3L.png" rel="nofollow noreferrer">Result</a></p>
  <p>Do you have a solution to allow me to perform a search with the Name object knowing that my search variable is: [Erai-raws] Boku no Hero Academia 4th Season - 01 [720p] [Multiple Subtitle]</p>
  <p>I have already tried with like, with match but as soon as I put &quot;[] *&quot;, nothing more &quot;match&quot; ...</p>
  <p>Thank you</p>