title: Matching strings with wildcard
body: <p>I would like to match strings with a wildcard (*), where the wildcard means "any". For example:</p>
  
  <pre><code>*X = string must end with X
  X* = string must start with X
  *X* = string must contain X
  </code></pre>
  
  <p>Also, some compound uses such as:</p>
  
  <pre><code>*X*YZ* = string contains X and contains YZ
  X*YZ*P = string starts with X, contains YZ and ends with P.
  </code></pre>
  
  <p>Is there a simple algorithm to do this?  I'm unsure about using regex (though it is a possibility).</p>
  
  <p>To clarify, the users will type in the above to a filter box (as simple a filter as possible), I don't want them to have to write regular expressions themselves.  So something I can easily transform from the above notation would be good.</p>