title: Validate a string that only contains a single occurrence of some specific substring
body: <p>I'm trying to match entire strings that:</p>
  <ol>
  <li>Only has one occurrence of the specified word</li>
  <li>Allows anything before and after the occurrence, except specified word</li>
  </ol>
  <p>The ideal results are as such:</p>
  <pre><code>{{REPLACE}}. // Valid
  {{REPLACE}} {{REPLACE}}. // Invalid
  {{REPLACE}}{{REPLACE}}. // Invalid
  Text here {{REPLACE}}. More text here. // Valid
  {{REPLACE}} text here {{REPLACE}}. More text here // Invalid
  </code></pre>
  <p>The closest I've gotten to is</p>
  <pre><code>{{REPLACE}}. // Valid
  {{REPLACE}} {{REPLACE}}. // Valid
  {{REPLACE}}{{REPLACE}}. // Invalid
  Text here {{REPLACE}}. More text here. // Valid
  {{REPLACE}} text here {{REPLACE}}. More text here // Valid
  </code></pre>
  <p>Using <code>/(?&lt;!({{REPLACE}}))({{REPLACE}}){1}(?!({{REPLACE}}))/</code></p>