title: match multiple words in any order with regex
body: <p>Ok lets say I whant to match 3 words in a sentence... but I neet to match them in any order, for example:</p>
  
  <pre><code>$sentences = Array(
     "one two three four five six seven eight nine ten",
     "ten nine eight seven six five four three two one",
     "one three five seven nine ten",
     "two four six eight ten",
     "two ten four six one",
  );
  </code></pre>
  
  <p>So I need to match the words "two", "four" &amp; "ten", but in any order and they can or not have any other words between them. I Try</p>
  
  <pre><code>foreach($sentences AS $sentence) {
     $n++;
     if(preg_match("/(two)(.*)(four)(.*)(ten)/",$sentence)) {
         echo $n." matched\n";
     }
  }
  </code></pre>
  
  <p>But this will match ONLY sentence 1 and I need to match in sentence 1,2,4 &amp; 5.</p>
  
  <p>I hope you can help...
  Regards!
  (and sorry for my english)</p>