Regular Expression Problems-nearly there!

From: Date: Mon, 18 Dec 2000 05:11:07 +0000
Subject: Regular Expression Problems-nearly there!
Groups: php.general 
Request: Send a blank email to php-general+get-30825@lists.php.net to get a copy of this message
Hi Guys, I am using the Regular Expression: $pat = "<span class=subnav>(.+)<\/span>"; $content = ereg_replace($pat, "[subnav]\\1[/subnav]", $content); // this is for <span class=caption> It works, but doesn't replace </span> with [/subnav] It works with a string such as: <span class=subnav>Content</span> But doesn't work with a string such as: <a name=\"top\"><span class=heading>Why this page</span><br>&nbsp;<br> <a href=\"#overview\"><span class=subnav>Overview</span></a> | <a href=\"#obi\"><span class=subnav>The asdf Standard</span></a> | <a href=\"#sel\"><span class=subnav>SEL</span></a><br>&nbsp;<br> <a name=\"overview\"><span class=subHeading>Overview</span><br> Cotenty type stuff in here.<br>&nbsp;<br> More contenty type stuff in here Any ideas on what is going on. Thanks Scott.

« previous php.general (#30825) next »