title: Exact match on word in middle of string in R
body: <p>I referred this question (<a href="https://stackoverflow.com/questions/41977763/how-to-filter-exact-match-string-using-dplyr">How to filter Exact match string using dplyr</a>) but mine is slightly different as the word is not the start but can occur anywhere in the string. I want TRUE to be returned only for first one not the second &amp; third</p>
  <pre><code>library(stringr)
  
  vec &lt;- c(&quot;this should be selected&quot;, &quot;thisus should not be selected&quot;,&quot;not selected thisis too&quot;)
  str_detect(vec,&quot;this&quot;)
  </code></pre>
  <p>Current output</p>
  <pre><code>TRUE TRUE TRUE
  </code></pre>
  <p>Expected output</p>
  <pre><code>TRUE FALSE FALSE
  </code></pre>