title: Bash regex matching not working
body: <p>so I have this function</p>
  
  <pre><code>function test(){
   local output="CMD[hahahhaa]"
   if [[ "$output" =~ "/CMD\[.*?\]/" ]]; then
    echo "LOOL"
   else
    echo "$output"
   fi;
  
  }
  </code></pre>
  
  <p>however executing test in command line would output $output instead of "LOOL" despite the fact that the pattern should be matching $output...</p>
  
  <p>what did I do wrong?</p>