title: How to extract text between square brackets with String.split
body: <p>I have text which contains tags expressed in this format: <code>[text other text]</code>.</p>
  
  <p>I'd like to split the string using square brackets as separators, but this:</p>
  
  <pre><code>String.split("\\[|\\]");
  </code></pre>
  
  <p>This doesn't give expected results.</p>
  
  <p>How can I do this?</p>