Re: Multiple line spanning regexp
| From: | Brad Hubbard | Date: | Wed, 08 Aug 2001 06:56:28 +0000 |
| Subject: | Re: Multiple line spanning regexp | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-61760@lists.php.net to get a copy of this message | ||
On Wed, 8 Aug 2001 14:41, Brad Hubbard wrote:
> I'm trying to delete everything in a <UL> that spans multiple lines.
>
> I just want to get rid of the whole thing and thought it would be
> relatively straight forward but I'm getting nowhere.
>
> The list takes the form;
>
> <UL>
> <LI CLASS="resultstable">Blah</LI>
> <LI CLASS="resultstable"><a
> href="http://somewhere">Blah</a></LI>
> </UL>
>
> So far I've got this;
>
> $response = preg_replace( "/(<ul>)(.*?)(<\/ul>)/im", "",
> $response );
>
> which doesn't work :-) HELP!
>
> TIA,
> Brad
Dohh!
Got it.
$response = preg_replace( "/(<ul>)(.*?)(<\/ul>)/is", "", $response
);
Don't you love people who fix their own problems.
Cheers,
Brad