email-reply-parser icon indicating copy to clipboard operation
email-reply-parser copied to clipboard

Issue with parsing Samsung reply

Open quinnlas opened this issue 3 years ago • 2 comments

When trying to parse this:

This is pretty awesome, nice work!Sent from my Verizon, Samsung Galaxy smartphone
-------- Original message --------From...

(I excluded the quoted reply, but it is there)

I would expect the output to be:

This is pretty awesome, nice work!

But instead I get the whole text.

I'm not sure what you can do about the Sent from... part because you probably don't want to cut off sentences that just happen to start with "Sent from". But I think you can add optional spaces to the regex and remove the end of line requirement like so:

/^-{1,10} ?Original message ?-{1,10}/

To at least handle the reply.

quinnlas avatar Jan 19 '22 19:01 quinnlas

Can you provide a bigger extract of this email?

I see two things here:

  • Adding a regex for Sent from my (.), (.) smartphone
  • Updating the Original message regex

baptistejamin avatar Jan 20 '22 09:01 baptistejamin

Sure, I have edited the emails and original text for privacy.

This is pretty awesome, nice work!Sent from my Verizon, Samsung Galaxy smartphone
-------- Original message --------From: [email protected] Date: 1/13/22  3:52 PM  (GMT-06:00) To: [email protected] Cc: [email protected] Subject: Status Updated 
    
      
blah blah blah

I think those are both good options. The original message regex seems more important because the chain of previous messages could be very long.

quinnlas avatar Jan 21 '22 17:01 quinnlas

Hello!

Issue should be solved now :)

baptistejamin avatar Jul 15 '24 07:07 baptistejamin