title: Replace/remove literal square brackets in Bash string
body: <p>I am looking for a solution to eliminate square brackets in a Bash string.
  For instance, consider the string:</p>
  
  <pre><code>ldr r3, [r0,#8]! 
  </code></pre>
  
  <p>However I am not sure how to eliminate the '[' and ']'. I would like to eliminate all symbols in the most elegant way possible, such as:</p>
  
  <pre><code>str="ldr r3, [r0,#8]!"
  echo ${str//[,.!]/}
  </code></pre>
  
  <p>but with square brackets inclusive. How can this be accomplished? </p>