Re: Can I use a function within an ereg_replace?

From: Date: Tue, 03 Apr 2001 18:34:54 +0000
Subject: Re: Can I use a function within an ereg_replace?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-46864@lists.php.net to get a copy of this message
On Tuesday 03 April 2001 20:06, you wrote: > Hey all, > > I'm trying to mangle email addresses to pass to an email sending form > and want to use a custom hashing function within an eregi_replace. > > Example: > > $text = eregi_replace("[my big email regex]", "send.php?addr=" . > hash_func("\\1@\\2.\\3"), $text); > > I can't seem to get this to work... it is just hashing the static text > within the function, not the replaced values. > > Can this just not be done? It can. But only with preg_replace. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) CPU not found. retry, abort, ignore?

« previous php.general (#46864) next »