try
$str = preg_replace("|\[details\].*?\[/details\]|si","", $str);
drop the i if you want it case sensitive.
Paul
"Richard Davey" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
>
> I've been having a wonderful night trying to solve this one, but
Hi Richard:
On Fri, Jun 28, 2002 at 02:36:59AM +0100, Richard Davey wrote:
> [details]...[/details]
> $message = preg_replace("'\[details\].*?'", "", $message);
You didn't state what you want to get out of this exercise.
To squash the detail tags and everything between them:
$msg = preg
"John Holmes" <[EMAIL PROTECTED]> wrote in message
000a01c21e45$92b64270$b402a8c0@mango">news:000a01c21e45$92b64270$b402a8c0@mango...
> Wouldn't you want to use preg_match() before you replace it?
In this instance, no I don't think so. I've already performed the task I
needed with the tags in que
Wouldn't you want to use preg_match() before you replace it?
www.php.net/preg_match
---John Holmes...
> -Original Message-
> From: Richard Davey [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 27, 2002 9:37 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] preg_replace pains
>
> Hi all,
>
4 matches
Mail list logo