title: javascript get strings between bracket [ ]
body: <p>in my paragraph I have to get the string between brackets [ ]</p>
  
  <p>ie)</p>
  
  <pre><code>&lt;p id="mytext"&gt;
      this is my paragraph but I have [code1] and there is another bracket [code2].
  &lt;/p&gt;
  </code></pre>
  
  <p>on my JavaScript I have go through all strings and get result of array only as 
  "code1" and "code2"</p>
  
  <p>thank you in advance!</p>