regular expression to remove original message from reply mail using in java ?
Posted
by ravi ravi
on Stack Overflow
See other posts from Stack Overflow
or by ravi ravi
Published on 2010-05-12T11:21:16Z
Indexed on
2010/05/12
11:24 UTC
Read the original article
Hit count: 414
In my forum, users can reply through email. I am handling mails from their reply. When they are replying the original message getting appended. I want to get only the reply message not the original message.
I have to write regular expression for gmail & hotmail.
I written regex for gmail as follows :
\n.wrote:(?s).--End of Post--
It is removing the original message except date. I want to remove the date also.
before removing the original message :
" hi 33
On Tue, May 11, 2010 at 4:18 PM, Mmmmm, Rrrrr wrote:
The following update has been posted to this discussion:
test as user 222
[$MESSAGE_SIGNATURE_HEADER$]
--End of Post-- "
When I use the above regex it is filtering as follows :
" hi 33
On Tue, May 11, 2010 at 4:18 PM, Mmmmm, Rrrrr "
Here i want only the actual message 'hi 33' not that date. How can I filter the date using above regex?
Also I need regex for Hotmail also.
I appreciate for any reply. Thanks in advance.
© Stack Overflow or respective owner