title: Regular expression to find two strings anywhere in input
body: <p>How do I write a regular expression to match two given strings, at any position in the string?</p>
  
  <p>For example, if I am searching for <code>cat</code> and <code>mat</code>, it should match:</p>
  
  <pre class="lang-none prettyprint-override"><code>The cat slept on the mat in front of the fire.
  At 5:00 pm, I found the cat scratching the wool off the mat.
  </code></pre>
  
  <p>No matter what precedes these strings.</p>