title: Regular Expressions: get what is outside of the brackets
body: <p>I'm using PHP and I have text like:</p>
  
  <pre><code>first [abc] middle [xyz] last
  </code></pre>
  
  <p>I need to get what's inside and outside of the brackets. Searching in StackOverflow I found a pattern to get what's inside:</p>
  
  <pre><code>preg_match_all('/\[.*?\]/', $m, $s)
  </code></pre>
  
  <p>Now I'd like to know the pattern to get what's outside.</p>
  
  <p>Regards!</p>