title: How to remove square brackets and anything between them with a regex?
body: <p>How can I remove text from between square brackets and the brackets themselves?</p>
  
  <p>For example, I need:</p>
  
  <pre><code>hello [quote="im sneaky"] world
  </code></pre>
  
  <p>to become:</p>
  
  <pre><code>hello world
  </code></pre>
  
  <p>Here's what I'm trying to use, but it's not doing the trick:</p>
  
  <pre><code>preg_replace("/[\[(.)\]]/", '', $str);
  </code></pre>
  
  <p>I just ended up with:</p>
  
  <pre><code>hello quote="im sneaky" world
  </code></pre>