title: Removing first square brackets in every line with the content in it (bash)
body: <p>I have a file <code>try.txt</code> that looks like this:</p>
  
  <pre><code>(SOME_PRINT): [a] content
  (SOME_PRINT): [a] [b] content
  </code></pre>
  
  <p>If I have this pattern in the beginning of a line in the file: <code>(SOME_PRINT): [&lt;word&gt;]</code> (where <code>&lt;word&gt;</code> is a combination of letters and numbers only), so I would like to replace it with <code>(OTHER_PRINT):</code>.<br>
  For the file above, I would like to find a command that its execution will make the file become:                    </p>
  
  <pre><code>(OTHER_PRINT): content
  (OTHER_PRINT): [b] content      
  </code></pre>
  
  <p>I tried to run <code>sed -r -i 's/^\(SOME_PRINT\)\: \[.*\] /\(OTHER_PRINT\)\: /' try.txt</code>  , and got this output:                   </p>
  
  <pre><code>(OTHER_PRINT): content
  (OTHER_PRINT): content               
  </code></pre>
  
  <p>Can you explain why has <code>[b]</code> disappeared?</p>