I am having a hard time with a script that will truncate junk returned in an email. Here are two examples...
Yup, lets see... Dan ----- Original Message ----- From: To: " Dan" Sent: Wednesday, February 09, 2005 10:09 PM Subject: RE:Test: Case Number: 3 > > > Greetings, > > > Email test for new address. > > > > Somegarbage >
I would like to remove everything from ----- Original Message ----- and after.
Second Example....
This is a multi-part message in MIME format. ------=NextPart_001_01C50F1C.540CE3C2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Retesting Reply with correct address somemore junk
I would like to strip everything before and after "Retesting Reply with correct address" which was the actual reply.
I've beat to death preg_replace, str_replace but can't get it to work right. Help appreciated.
Rab