title: Regular expression to search for text using star characters
body: <p>I'm writing a Java application where a user can reduce a List of strings based on a filter that the user supplies. </p>
  
  <p>So for example, the user could enter a filter such as:</p>
  
  <pre><code> ABC*xyz
  </code></pre>
  
  <p>This means that user is looking for strings that start with ABC and have xyz that follow (That would be the same as doing a search for <code>ABC*xyz*</code>)</p>
  
  <p>Another example of a filter the user could enter is:</p>
  
  <pre><code> *DEF*mno*rst
  </code></pre>
  
  <p>This means that the string can start with anything, but it must then follow with DEF, followed by mno, followed by rst.</p>
  
  <p>How would I write the Java code to be able generate the regular expression that I need to figure out if my strings match the filter the user has specified?</p>