title: sed regex, work on substrings and not on whole line
body: <p>suppose to have the following string:</p>
  
  <pre><code>commandone{alpha} commandtwo{beta} {gamma}commandthree commandtwo{delta}
  </code></pre>
  
  <p>and I want to abtain:</p>
  
  <pre><code>commandone{alpha} beta {gamma}commandthree delta
  </code></pre>
  
  <p>well I'm triying with regex and sed, I can easily find if is it present the pattern I look for
  /commandtwo{.*}/ but not erasing commandtwo and the following two brakets. A way would be to work only the substrings "<em>commandtwo{beta}</em>" and "<em>commandtwo{delta}</em>" but I don't know even if is it possible or noto using sed.</p>
  
  <p>I'm looking for a regex to perform the action I've described.
  thank in advance</p>