title: Ruby Filtering issue
body: <p>I have been trying to filter some text from a file to only show certain years of birth</p>
  
  <p>I have some ruby that reads in a file ages.txt, it contains names and years of birth</p>
  
  <ul>
  <li>Joe Bloggs (2001)</li>
  <li>Mary Bloggs (1987)</li>
  <li>John apples (2010)</li>
  <li>Old Guy (1990)</li>
  </ul>
  
  <p>I wish to be able to filter for a year range, i.e. to find people born between 1987 and 1990</p>
  
  <p>I have tried </p>
  
  <pre><code>#open('ages.txt') { |f| f.grep(/^19(8[0-9]|10)$/) }
  </code></pre>
  
  <p>but I get an error </p>
  
  <pre><code>ages.rb:3:in `===': invalid byte sequence in UTF-8 (ArgumentError)
  </code></pre>
  
  <p>Any help would be greatfull.</p>