title: How to regex square brackets?
body: <p>The problem: I want to get all of the square brackets' content, and then delete them, but only if the brackets are at the beginnig of the string.</p>
  
  <p>For example, a given string <code>[foo][asd][dsa] text text text</code> will return array with all of the three brackets' content (<code>["foo", "asd", "dsa"]</code>), and the string will become <code>text text text</code>.</p>
  
  <p>But if the string looks like that: <code>[foo] text [asd][dsa] text text</code>, it'll take only the <code>[foo]</code>, and the string will become: <code>text [asd][dsa] text text</code>.</p>
  
  <p>How can I do that using JavaScript?</p>