title: Replace string between square brackets with sed
body: <p>I have some strings in a textfile that look like this:</p>
  
  <pre><code>[img:3gso40ßf]
  </code></pre>
  
  <p>I want to replace them to look like normal BBCode:</p>
  
  <pre><code>[img]
  </code></pre>
  
  <p>How can I do that with sed? I tried this one but it doesn't do anything:</p>
  
  <pre><code>sed -i 's/^[img:.*]/[img]/g' file.txt
  </code></pre>