Search for a string between two end points

From: Date: Mon, 16 Sep 2002 22:23:00 +0000
Subject: Search for a string between two end points
Groups: php.general 
Request: Send a blank email to php-general+get-116571@lists.php.net to get a copy of this message
How do you do a search between two strings. For instance, if I wanted to remove everything between two string points, like say the first occurrence between"<Table>" & "</Table>". Normally, I split a string into pieces to get what I want like this. list($Junk1, $DataStart) = split("<table>", $SomeString); list($DataEnd, $Junk2) = split("</table", $DataStart); print $DataStart; In this case however, instead of printing out everything between those two points, I want to remove it from the string. I just don't know how.

« previous php.general (#116571) next »