eregi_replace problems

From: Date: Wed, 22 May 2002 15:43:39 +0000
Subject: eregi_replace problems
Groups: php.windows 
Request: Send a blank email to php-windows+get-13920@lists.php.net to get a copy of this message
I'm trying to replace values within a string with a value looked up from a database. I have a function that looks up the value in the database for me but I'm having trouble passing the value to the function because of the backslashes, is there a way around this? Code: $cntnt = eregi_replace("\[L=([a-zA-Z]+)]"."([a-zA-Z]+)\[EL]", "<a href=\"" . fndLnk(\\1) . "\">\\2</a>", $cntnt); fndLnk is the function and the error I receive is - Warning: Unexpected character in input: '\' (ASCII=92) state=1 Thanks for any help Zac

« previous php.windows (#13920) next »