I am parsing a few letters. Mobile Mail, iPhone, and I assume that iPod touch adds the signature as a separate border, making it easier to delete. Not all email clients, and just use "-" as a signature separator.
I need to cut '-' from a string, but only in the latter case.
Copy example
hello, this is some email copy-- check this out
--
Tom Foolery
I need to divide by "-" by deleting the last part, and I would get it, but explode () and split () do not return large values to tell me if this did something, in case there is no match.
I cannot get preg_replace to go through multiple lines. I standardized all line endings for \ n
What is the best offer in the end, “hello, this is some kind of email - check it out”, without accepting, there will be cases when there is no signature, and, of course, there will be cases when I cannot cover all cases.
scott
source
share