|
Posted by Charles on 06/20/05 15:40
On 6/20/2005 1:08:49 AM, "merlinfly" wrote:
>Regarding the first regex you need to set the multiline flag
>to 's', although to be on the safe side you can add 'i' in order to
>ignore case.
>Therefore you're php code should end up like so:
>
>$body = preg_replace("/---.*?Sig line1.*?Sig line2.*?Sig
>line3/si","",$body);
>
>More clearly:
>( "/<regex here>/si", "", $body );
>
>To remove quotes you should put something like:
>$body = preg_replace('/>.*/', '', $body);
>without '//si' !
>
>In summary 'si' comes in very handy at times.
>
>
Any idea why my syntax blew away the whole text though? Sounds like I should
be getting fewer matches if it wouldn't go across lines.
[Back to original message]
|