title: checking if a string with asterisk(*) is present within another string
body: <p>I am working on a program to check if a particular string is present in the given string: that is if one string is sub string of another string.</p>
  <p>For example:</p>
  <blockquote>
  <p>1)<strong>String</strong>: YoungPeople  --&gt;   <strong>Substring to be checked</strong>: ungPeo</p>
  <pre><code>  The output should return true.
  </code></pre>
  <p>2)<strong>String</strong>: Hello How are You? --&gt; <strong>Substring to be checked</strong>: l*are</p>
  <pre><code>    The output should return true.
  </code></pre>
  </blockquote>
  <p>I have used the naive based searching algorithm and it works perfectly fine for the first input.</p>
  <p>But I am having trouble in the second kind of input where the asterisk(*) is present which should be treated as a regular expression: i.e. matches zero or more characters.</p>
  <p>How should I check for the sub string having an * sign?</p>
  <p>Should I try to use the same naive algorithm for searching the character before * and for the string after it?  Or is there a better approach to solve this problem?</p>