Reply to Re: Help with preg_replace

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация