title: sed to replace partial string
body: <p>I would like to do the following by using sed</p>
  
  <p><strong>case 1:</strong></p>
  
  <pre><code>*here is some random text constant=randomValue some more random text*
  </code></pre>
  
  <p>I would like to replace randomvalue directly after constant= while keeping the rest of the line intact so the result would look like:</p>
  
  <pre><code>*here is some random text constant=substituteValue some more random text*
  </code></pre>
  
  <p><strong>case2:</strong></p>
  
  <pre><code>*here is some random text constant= randomValue some more random text*
  </code></pre>
  
  <p>similar to the first one but with a space after the constant= string, so the output would be </p>
  
  <pre><code>*here is some random text constant= substituteValue some more random text*
  </code></pre>
  
  <p>For case one i've been trying to use: </p>
  
  <pre><code>echo $line | sed 's/server=.*\ /sever=\&lt;SrvrName\&gt;/'
  </code></pre>