title: Why does BASH_REMATCH not work for a quoted regular expression?
body: <p>The code is like this:</p>
  
  <pre><code>#!/bin/bash
  if [[ foobarbletch =~ 'foo(bar)bl(.*)' ]]
   then
       echo "The regex matches!"
       echo $BASH_REMATCH
       echo ${BASH_REMATCH[1]}
       echo ${BASH_REMATCH[2]}
   fi
  </code></pre>
  
  <p>When I try to run it, it doesn't display anything:</p>
  
  <pre><code>bash-3.2$ bash --version
  GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)
  Copyright (C) 2007 Free Software Foundation, Inc.
  bash-3.2$ /bin/bash test_rematch.bash
  bash-3.2$ 
  </code></pre>
  
  <p>Does anyone have ideas about this?</p>