title: Replace [ ] bracket in a string
body: <p>I have a string that includes brackets, <code>[]</code>, around a number. Since this string represents my column names for a SQL database I need to remove/replace them.
  So far I do it in the following way:</p>
  <pre><code>if (stringWithBracket.Contains(&quot;[0]&quot;))
     noBracket = data.Replace(&quot;[0]&quot;, &quot;0&quot;);
  if (stringWithBracket.Contains(&quot;[1]&quot;))
     noBracket = data.Replace(&quot;[1]&quot;, &quot;1&quot;);
  if (stringWithBracket.Contains(&quot;[2]&quot;))
     noBracket = data.Replace(&quot;[2]&quot;, &quot;2&quot;);
  if (stringWithBracket.Contains(&quot;[n]&quot;))
     noBracket = data.Replace(&quot;[n]&quot;, &quot;n&quot;);
  </code></pre>
  <p>It works fine, but it looks ugly for me since I have to do that for [1] to [20].</p>
  <p>Is there a way to implement this &quot;nicer&quot; which means with less code for me?</p>