Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some variations to signature Regex #69

Open
mcki0127 opened this issue Jan 5, 2019 · 3 comments
Open

Add some variations to signature Regex #69

mcki0127 opened this issue Jan 5, 2019 · 3 comments

Comments

@mcki0127
Copy link

mcki0127 commented Jan 5, 2019

@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?

@abrgitlab
Copy link

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.

@petski
Copy link

petski commented May 21, 2019

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();

@glensc
Copy link
Collaborator

glensc commented Mar 24, 2020

yes, this came with 2.7.0 release:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants