title: Wildcard matching strings
body: <p>I am trying to write a function <code>bool match(char pattern[], char expresssion[])</code>
  which checks if the pattern matches the expression. If <code>*</code> appears in the pattern, it can be matched with any string - the empty string as well. This is where my problem arises.</p>
  
  <p>I am trying to cater for this star. My first idea was to check the next character that appears after the star and see whether it appears in the expression. If it appears at the n-th position, I move one-character in the pattern and start checking the expression further from the n-th position. However, it is not always obvious whether I should check my expression from the left or from the right. For example - if checked from the left, then this test would fail: <br></p>
  
  <pre><code>match("a*b", "ababab")
  </code></pre>
  
  <p>because only the first "b" would be "devoured" by the star. On the contrary, if I checked from the right, then this test would fail:</p>
  
  <pre><code>match("a*b*b*", "abbbbbbbba")
  </code></pre>
  
  <p>Could you give me a hint how I could deal with this star?</p>