title: Exclude exact string using regex negative lookahead
body: <p>I want to exclude <code>pqr</code> from a string using regex.</p>
  
  <p>What I currently have is</p>
  
  <pre><code>abc\/(?!.*pqr).*\/xyz
  </code></pre>
  
  <p>This correctly rejects <code>abc/pqr/xyz</code>, but it also rejects <code>abc/pqrst/xyz</code> which I want it to match.</p>
  
  <p>I want <code>pqr</code> only to be excluded when it's a complete word, and not when it's a sub-string of a longer word such as <code>pqrst</code>.</p>