You are here: Re: regex help « PHP Programming Language « IT news, forums, messages
Re: regex help

Posted by Justin Koivisto on 10/30/48 11:44

basement_addict@yahoo.com wrote:
> I am trying to remove all the headers in a text file.
>
> I tried this preg_replace('/^.*\n/', '',$body) but it only removed the
> first one.
>
>
>
> start of document-> Content-Type: text/plain
> Content-Transfer-Encoding: 8bit
> X-Input-Content-Type: application/msword
> X-Translator-Status: translating
>
>
> remove up to here ->This is the body of the document asdfdsafasdf

preg_replace('`^.*(\n{2}|\r\n{2})`Us','',$body);

--
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com

 

Navigation:

[Reply to this 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

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