-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Labels
Description
There appears to be an issue with the original regex defined for matching signatures:
(--|__|-\w)|(^Sent from my (\w+\s*){1,3})
The above correctly matches the phrase: 'Sent from my iPhone' etc.
But the first group also matches any line containing '--', '__' or '-'. So you get matches for any line containing a hyphenated word for instance:
'This is an auto-reply test to see if I receive an automated message'
I've tested this using the online tool at https://regex101.com/ and also using the built-in .Net regular expression matcher.
The fix appears to be to ensure the first group only looks for matches that start with the defined characters:
(^--|^__|^-\w)|(^Sent from my (\w+\s*){1,3})