At 04:50 PM 7/4/2006, Brian Dunning wrote:
I have the source of a web page stored in $here and I want to set
$this to whatever appears between '<span class="myclass">' and '</
span>'. Example:
$here contains (amid tons of other stuff): <span
class="myclass">This is a statement.</span>
If you can depend on the markup you provided, you can use:
$this = preg_replace("/<[^>]+>/", "", $here);
to replace any <tag> with nothing. The regular expression /<[^>]+>/
parses to <{one or more characters that aren't >}>
Paul
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php