title: Select-String -pattern not taking variable
body: <p>I am trying to use a variable in <code>select-string -pattern</code> but it returns nothing. If I copy and paste the contents of the variable into the syntax, it works. </p>
  
  <p>What I have is a few hashes that I previously recorded and want to get the hashes of the same directory again and see if they are the same ones previously recorded, hence why I am trying to use select-string.</p>
  
  <p>Used to get the original hashes:</p>
  
  <pre><code>$data2hash = "C:\users\blue\Desktop\*.txt"
  $hash = Get-FileHash $data2hash -Algorithm md5
  $h_hash = $hash.hash 
  
  
  PS C:\Users&gt; get-filehash c:\users\bob\desktop\* -Algorithm md5 | export-csv c:\users\bob\desktop\hashes.csv                                                                
  
      Algorithm           Hash                                                                       Path                                                                                          
      ---------               ----                                                                       ----                                                                                          
      MD5                 E081EAAA07EC3CBC71DBC374E85B3031                                       c:\users\bob\desktop\1.txt                                                                                      
      MD5                 78D85AB09077BA9BE641C5AFC1EDFEE9                                       c:\users\bob\desktop\2.txt                                                                                                                                                       
      MD5                 69B8789ED87248AB5B69C0421ADF6E54                                       c:\users\bob\desktop\3.txt                                                                                                                                            
      MD5                 34DF279CA08B79238246787321939C60                                       c:\users\bob\desktop\4.txt         
  </code></pre>
  
  <p>Verification phase</p>
  
  <pre><code>    $db = 'C:\users\bob\Desktop\hashes.csv'
      $db2 = Get-Content $db
  
      $some_data = "C:\users\bob\Desktop\*"
      $new_hashes = Get-FileHash $data2hash -Algorithm md5
      $h_hashes = $hash.hash 
  
      foreach($h in $h_hash)
      {
      $format_hash = "'" + $h + "',"
      $d += $format_hash
      }
      $d = $d.substring(0,$d.length-1)
  
  
  
      PS C:\Users\bob\desktop&gt; $d.GetType() 
      IsPublic IsSerial Name                                     BaseType                                                                                                                 
      -------- -------- ----                                     --------                                                                                                                  
      True     True     String                                   System.Object
  
  
      $db2 | select-string -pattern $d
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>PS C:\Users&gt; $db2 | select-string -pattern $d
  
  "MD5","3C535413A18289E8CEEF69ED15479515","C:\users\blue\Desktop\computers.txt"
  "MD5","60E6B4CF0E9A1E99E5861ECE1001DB3D","C:\users\blue\Desktop\filecheck.txt"
  "MD5","BC36FF295E4A68EE9C8E04B1D833E836","C:\users\blue\Desktop\FilesCheck_02-08-14.txt
  </code></pre>