title: How do I write a simple regular expression pattern matching function in C or C++?
body: <p>This is a question in my paper test today, the function signature is </p>
  
  <pre><code>int is_match(char* pattern,char* string)
  </code></pre>
  
  <p>The pattern is limited to only ASCII chars and the quantification <code>*</code> and <code>?</code>, so it is relatively simple. <code>is_match</code> should return 1 if matched, otherwise 0.</p>
  
  <p>How do I do this?</p>