Fw: [PHP] Search for a string between two end points
| From: | Kevin Stone | Date: | Mon, 16 Sep 2002 22:34:32 +0000 |
| Subject: | Fw: [PHP] Search for a string between two end points | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-116572@lists.php.net to get a copy of this message | ||
preg_replace();
http://www.php.net/manual/en/function.preg-replace.php
-Kevin
----- Original Message -----
From: "Christopher J. Crane" <ccrane@inxdesign.com>
To: <php-general@lists.php.net>
Sent: Monday, September 16, 2002 4:23 PM
Subject: [PHP] Search for a string between two end points
> 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.
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>