On Tuesday 06 January 2004 12:35, Aaron Axelsen wrote: > I am fighting replacing items in the following hunk of code. This code is > pulled from a database, and then I want to replace items like <<name>> with > the contents of a variable $name. > > I have tried code like: > preg_replace("/\<\<\?.*?\>\>/",$name,$paypal);
The angle brackets have no special meaning so there's no need to escape them. Something like: preg_replace('/(<<.*>>)/U', $name, $paypal); should work. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Time is an illusion, lunchtime doubly so. -- The Hitchhiker's Guide to the Galaxy */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php