title: Remove a parts of string and put it inside Array
body: <p>I want to remove a parts of string.</p>
  
  <p>for example:</p>
  
  <p>Original string:</p>
  
  <pre><code>1     |  2  | 3
  [A]B  |  C  | [D]
  C[D]  |  C
  </code></pre>
  
  <p>I want only the parts which not contained within <code>[]</code></p>
  
  <p>Future result:</p>
  
  <pre><code>1 2 3 B C
  </code></pre>