EmailReplyParser
EmailReplyParser copied to clipboard
Add some variations to signature Regex
@willdurand I would like to add "Sent via the", "Sent from the", and "Sent from" to the signature Regex. These are standard Android/Galaxy signatures.
/(?:^\s*--|^\s*__|^-\w|^-- $)|(?:^Sent (from|via) (my|the )?(?:\s*\w+){1,4}$)|(?:^={30,}$)$/s
Is this acceptable?
The same problem: I need to add russian variant. There's polish has variants "pisze|napisał", but russian/ukranian has only "написа(л|ла|в)". There's "пише(|т)" need to be added.
You can set the signature regex to whatever you like, like this:
$parser = new \EmailReplyParser\Parser\EmailParser();
$parser->setSignatureRegex('/your regex here/s');
$content = $parser->parse($string)->getVisibleText();