title: Jquery search word in string
body: <p>I have html content where some words have success, failure etc. I am trying to use a regular expression to filter with single keyword or combination of keywords from multi selection checkboxes. The result of multi selection checkboxes is a comma separated string. Is there any condition to check if my html content has success or failure or other string cases. I am trying to search for <strong>or</strong> clause with regular expression</p>
  
  <p>Case 1</p>
  
  <pre><code>var filter = 'success';
  $(this).html().search(new RegExp(filter, "i")) &gt; 0) {
  alert('data found')
  }
  </code></pre>
  
  <p>Case 2:</p>
  
  <pre><code>var filter = 'success, failure';
  $(this).html().search(new RegExp(filter, "i")) &gt; 0) {
  alert('data found')
  }
  </code></pre>