redarrow Posted July 10, 2006 Share Posted July 10, 2006 I just was learning preg_match from the manual and i see that theres littile changes to eregi so what can preg_match do what eregi can not.<?$match="my little home";if(preg_match("/little/",$match)) {echo "matched";}else{echo " no match";}?><?$match="my little home";if(eregi("little",$match)) {echo "matched";}else{echo " no match";}?> Quote Link to comment Share on other sites More sharing options...
ShogunWarrior Posted July 10, 2006 Share Posted July 10, 2006 Preg match uses PERL regex syntax, I believe it's just a bit expanded. Quote Link to comment Share on other sites More sharing options...
redarrow Posted July 10, 2006 Author Share Posted July 10, 2006 ok i know see the diffrence i used this link to compare the diffrence in exspression code.http://www.zend.com/manual/reference.pcre.pattern.syntax.phpbut i still like eregi theo lol................ Quote Link to comment Share on other sites More sharing options...
effigy Posted July 11, 2006 Share Posted July 11, 2006 PCRE:[list][*]are (typically) faster;[*]are binary safe;[*]allow greediness modifications;[*]have better shortcuts (in my opinion);[*]are more advanced (lookarounds, recursion, subpatterns);[*]are decimal, octal, hex, UTF-8, and Unicode friendly;[*]have more switches, especially a documentation-friendly one (x).[/list] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.