title: regex for getting text inside [bbcode]
body: <p>How get the text inside a custom bbcode,</p>
  
  <pre><code>[gallery] get this text [/gallery].
  </code></pre>
  
  <p>I am using this regex but it wont work</p>
  
  <pre><code>/^(.*)\[gallery.*?\[\/gallery\](.*)$/gmi
  </code></pre>