Re: Scrapping email content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 15 July 2009 08:38:28 Tom Chubb wrote:
> 2009/7/15 Areba Collins <arebacollins@xxxxxxxxx>
>
> > Hello guys, i have a quick one:
> >
> > Im working on an app that reads email and converts it into a post on a
> > forum, everything works fine except the threaded comments at the
> > bottom. I would like to delete everything that is from a previous
> > email (which usually begins with on this ate, so and so wrote : and
> > then comments preceeded by >>
> >
> > Does anyone know a straightforward function to accomplish this?
> >
> > Regards,
> > Collins -Nairobi KE.
> >
> > --
> > If you have an apple and I have an apple and we exchange these apples
> > then you and I will still each have one apple. But if you have an idea
> > and I have an idea and we exchange these ideas, then each of us will
> > have two ideas.
> >
> > George Bernard Shaw
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> How about marking the email as read and not deleting it. Compare following
> emails to previous read emails and strip out any common text and strip out
> "> " and any other common indentation, etc.

Or a regex a bit like this:

^>.+$

That should match any line beginning with a > character, so you can just 
replace any such lines with nothing.

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux