title: Extract the nth to nth characters of an string object
body: <p>I have a filename and I wish to extract two portions of this and add into variables so I can compare if they are the same.</p>
  
  <pre><code>$name = FILE_20161012_054146_Import_5785_1234.xml 
  </code></pre>
  
  <p>So I want...</p>
  
  <pre><code>$a = 5785
  $b = 1234
  
  if ($a = $b) {
    # do stuff
  }
  </code></pre>
  
  <p>I have tried to extract the 36th up to the 39th character</p>
  
  <pre><code>Select-Object {$_.Name[35,36,37,38]}
  </code></pre>
  
  <p>but I get</p>
  
  <pre>{5, 7, 8, 5}</pre>
  
  <p>Have considered splitting but looks messy.</p>