the current function been put in place replaces [f1253f] with a file, for inside cms content , where 1253 is the key or the id of the filename in the database , therefore to denote its an ftool they added f's around the keys , so maybe i could get away with [1253], what else i'm asking if preg_replace is more efficient over eregi_replace ?
>===== Original Message From <[EMAIL PROTECTED]> ===== >> yes another one sorry, i'm trying to find the most efficient way to do >a >> replactment over this >> eregi_replace("\[f$key\f\]","$value",format_content($content));, would >> preg_replace be quicker and how could i go about it ? >> >> i'd need to replace [f1247f] with its replacement value better still >maybe >> even [1313431] is needed ? i dont know why they has f's in there ? > >What exactly are you trying to match and replace? Anything between [ and >]? Is 'f' the only letter that might appear? Is there a limit on the >amount of numbers that'll be between [ and ]? Are you replacing all >matches with the same $value? > >---John W. Holmes... > >PHP Architect - A monthly magazine for PHP Professionals. Get your copy >today. http://www.phparch.com/ > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php