title: Grep's "Invalid range end" ­— bug or feature?
body: <p>I've got these three files:</p>
  
  <pre><code>$ cat pattern-ok 
  ['\-]
  $ cat pattern-buggy 
  [\-']
  $ cat text 
  abc'def-ghi
  </code></pre>
  
  <p>And now, is the following a bug or a regexp feature I don't know?</p>
  
  <pre><code>$ cat text | grep -f pattern-ok 
  abc'def-ghi
  $ cat text | grep -f pattern-buggy
  grep: Invalid range end
  </code></pre>
  
  <p>I'm using:</p>
  
  <pre><code>$ grep --version | head -n 1
  grep (GNU grep) 2.20
  </code></pre>