title: how to replace part of a string using sed
body: <pre><code>echo "/home/repository/tags/1.9.1/1.9.1.8/core" | sed "s/HELP/XXX/g"
  </code></pre>
  
  <p>I would like some HELP in replacing what is in between tags and core with let's say XXX.  So my desired output would be /home/repository/tags/XXX/core.</p>
  
  <p>The string is a directory path, where /home/repository/tags are the only constant parts. The path is always six levels deep.  So it may not always be between tags and core.</p>