title: How do I replace the string exactly using gsub()
body: <p>I have a corpus:
  txt = "a patterned layer within a microelectronic pattern."
  I would like to replace the term "pattern" exactly by "form", I try to write a code:</p>
  
  <pre><code>txt_replaced = gsub("pattern","form",txt)
  </code></pre>
  
  <p>However, the responsed corpus in txt_replaced is:
  "a formed layer within a microelectronic form."</p>
  
  <p>As you can see, the term "patterned" is wrongly replaced by "formed" because parts of characteristics in "patterned" matched to "pattern".</p>
  
  <p>I would like to query that if I can replace the string exactly using gsub()?
  That is, only the term with exactly match should be replaced.</p>
  
  <p>I thirst for a responsed as below:
  "a patterned layer within a microelectronic form."</p>
  
  <p>Many thanks!</p>