title: bash regex not working
body: <p>So I have this code</p>
  
  <pre><code>function test(){
    local output="ASD[test]"
    if [[ "$output" =~ ASD\[(.*?)\] ]]; then
       echo "success";
    else
       echo "fail"
    fi;
  }
  </code></pre>
  
  <p>And as you can see it's supposed to echo success since the string matches that regular expression. However this ends up returning fail. What did I do wrong?</p>