title: How to substitute multiple words with spaces in R?
body: <p>Here is an example:</p>
  
  <pre><code>drugs&lt;-c("Lapatinib-Ditosylate", "Caffeic-Acid-Phenethyl-Ester", "Pazopanib-HCl", "D-Pantethine")
  
  ads&lt;-"These are recently new released drugs Lapatinib Ditosylate, Pazopanib HCl, and Caffeic Acid Phenethyl Ester"
  </code></pre>
  
  <p>What I wanted is to correct the drug names in <code>ads</code> with the names in <code>drugs</code> such that a desired output would be:</p>
  
  <pre><code>"These are recently new released drugs Lapatinib-Ditosylate, Pazopanib-HCl, and Caffeic-Acid-Phenethyl-Ester"
  </code></pre>