title: How to implement a SQL like 'LIKE' operator in java?
body: <p>I need a comparator in java which has the same semantics as the sql 'like' operator.
  For example:</p>
  
  <pre><code>myComparator.like("digital","%ital%");
  myComparator.like("digital","%gi?a%");
  myComparator.like("digital","digi%");
  </code></pre>
  
  <p>should evaluate to true, and</p>
  
  <pre><code>myComparator.like("digital","%cam%");
  myComparator.like("digital","tal%");
  </code></pre>
  
  <p>should evaluate to false. Any ideas how to implement such a comparator or does anyone know an implementation with the same semantics? Can this be done using a regular expression?</p>