title: How to effectively check if a string contains one of a few sub strings?
body: <p>How can I effectively check if a string contains one of a few sub strings?
  Suppose I have a string:</p>
  
  <pre><code>`Hi there, &lt;B&gt;my&lt;/B&gt; name is Joe &lt;DIV&gt;.&lt;/DIV&gt; Hello world. &amp;nbsp;`
  </code></pre>
  
  <p>How can I check if the string contains either <code>&lt;B&gt;</code> <strong>OR</strong> <code>&lt;DIV&gt;</code> <strong>OR</strong> <code>&amp;nbsp;</code>?</p>
  
  <p>I could do a simple:</p>
  
  <pre><code>Result := (Pos('&lt;B&gt;', S) &gt; 0) or 
            (Pos('&lt;DIV&gt;', S) &gt; 0) or 
            (Pos('&amp;nbsp;', S) &gt; 0);
  </code></pre>
  
  <p>But this seems to be very inefficient since it make <code>N</code> (at worst) passes and my strings are considerably large. </p>