title: Regex matching a percentage of tokens - possible?
body: <p>I am working of a type of fuzzy match program.  I have a series of tokens I am matching.  (Program is written in Delphi XE6 if that makes any difference).</p>
  
  <p>I would like to match against a set of token, but a percentage of the tokens.
  For example, I have a regex expression searching for the tokens 'one, two' and 'three'.  This REQUIRES all three tokens.  Is there a way to build a Regex Expression which says match a minimum 50% of the token?  I know I can say 'Match any token', then do Substring checking and math...</p>
  
  <p>Here is my Regex expression.</p>
  
  <pre><code>^(?=.*?\bone)(?=.*?\btwo)(?=.*?\bthree).*$
  </code></pre>
  
  <p>As an example.. IN PSEUDO-CODE...  I am looking for something like...</p>
  
  <pre><code> ^[MATCH=50%MIN](?=.*?\bone)(?=.*?\btwo)(?=.*?\bthree).*$
  </code></pre>
  
  <p>since I have 3 tokens, \bone, \btwo, and \bthree, matching at least 50% of these tokens means that I have to match 2 out of the three, so</p>
  
  <pre><code>one four three = MATCHED
  </code></pre>
  
  <p>whereas </p>
  
  <pre><code>one four five = NOT MATCHED
  </code></pre>
  
  <p>Any ideas?</p>