View Single Post
Old 07-17-2005, 01:56 AM   #7 (permalink)
jaswinder_rana
The Acquainted
 
Join Date: May 2005
Posts: 106
Thanks: 0
jaswinder_rana is on a distinguished road
Default

Regular Expression
there are 2 types of functions for matching regular expressions

ereg, and preg_match

ereg, is PHP's regular expression matching function (as far as i know, can be wrong)
and preg_match is based on perl regular expression matching.

Both consume time, so try to use other this like substr, strstr if they can be applicable in your situation, but if its must to use regular expression then use
preg_match()
its twice as much faster than ereg.

theres nothing which you can't do in both, just speed difference is a lot, and it counts in fairly large applications.
__________________
---------------------------
Errors = Improved Programming.
Portfolio
Send a message via MSN to jaswinder_rana
jaswinder_rana is offline  
Reply With Quote