title: How To Sed Search Replace Entire Word With String Match In File
body: <p>I have modified the code found here: <a href="https://stackoverflow.com/questions/1032023/sed-whole-word-search-and-replace">sed whole word search and replace</a></p>
  
  <p>I have been trying to use the proper syntax <code>\&lt;</code> and <code>\&gt;</code> for the sed to match multiple terms in a file. </p>
  
  <p><code>echo "Here Is My Example Testing Code" | sed -e "$(sed 's:\&lt;.*\&gt;:s/&amp;//ig:' file.txt)"</code></p>
  
  <p>However, I think, because it's looking into the file, it doesn't match the full word (only exact match) leaving some split words and single characters.</p>
  
  <p>Does anyone know the proper syntax?</p>
  
  <p>Example:</p>
  
  <p>Input: </p>
  
  <p><code>Here Is My Example Testing Code</code></p>
  
  <p>File.txt:</p>
  
  <pre><code>example
  test
  </code></pre>
  
  <p>Desired output:</p>
  
  <p><code>Here Is My Code</code></p>