title: Asterisk in eregi
body: <pre><code>//URL START
  $urlregex = "^(https?|ftp)\:\/\/";
  // USER AND PASS
  $urlregex .= "([a-z0-9+!*(),;?&amp;=\$_.-]+(\:[a-z0-9+!*(),;?&amp;=\$_.-]+)?@)?";
  // HOSTNAME OR IP
  $urlregex .= "[a-z0-9+\$_-]+(\.[a-z0-9+\$_-]+)*";
  // PORT
  $urlregex .= "(\:[0-9]{2,5})?";
  // PATH
  $urlregex .= "(\/([a-z0-9+\$_-]\.?)+)*\/?";
  // GET Query
  $urlregex .= "(\?[a-z+&amp;\$_.-][a-z0-9;:@/&amp;%=+\$_.-]*)?";
  // ANCHOR
  $urlregex .= "(#[a-z_.-][a-z0-9+\$_.-]*)?\$";
  // check
  if (eregi($urlregex, $url)) {echo "good";} else {echo "bad";}
  </code></pre>
  
  <p>but what if I have <code>http://www.example.com/about-me/my-4*-hotel/</code></p>
  
  <p>That eregi check isn't valid because of the asterisk. What should I do?</p>