Skip to content

Commit bc9997d

Browse files
committed
Merge pull request #32 from pbrzoski/master
Fixed the regex detecting day in date quote header
2 parents 799d08e + 119af2f commit bc9997d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/EmailReplyParser/Parser/EmailParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class EmailParser
3030
'/^(Le\s.+écrit :)$/ms', // Le DATE, NAME <EMAIL> a écrit :
3131
'/^(El\s.+escribió:)$/ms', // El DATE, NAME <EMAIL> escribió:
3232
'/^(W dniu\s.+(pisze|napisał):)$/ms', // W dniu DATE, NAME <EMAIL> pisze|napisał:
33-
'/^(20[0-9]{2}\-(?:0?[1-9]|1[012])\-(?:0?[1-2][0-9]|3[01]|[1-9])\s[0-2]?[0-9]:\d{2}\s.+:)$/ms', // 20YY-MM-DD HH:II GMT+01:00 NAME <EMAIL>:
33+
'/^(20[0-9]{2}\-(?:0?[1-9]|1[012])\-(?:0?[0-9]|[1-2][0-9]|3[01]|[1-9])\s[0-2]?[0-9]:\d{2}\s.+:)$/ms', // 20YY-MM-DD HH:II GMT+01:00 NAME <EMAIL>:
3434
);
3535

3636
/**

tests/EmailReplyParser/Tests/Parser/EmailParserTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ public function getDateFormats()
239239
array('On Tue, 2011-03-01 at 18:02 +0530, Abhishek Kona wrote:'),
240240
array('2014-03-20 8:48 GMT+01:00 Rémi Dolan <[email protected]>:'), // Gmail
241241
array('2014-03-20 20:48 GMT+01:00 Rémi Dolan <[email protected]>:'), // Gmail
242+
array('2014-03-09 20:48 GMT+01:00 Rémi Dolan <[email protected]>:'), // Gmail
242243
array('Le 19 mars 2014 10:37, Cédric Lombardot <[email protected]> a écrit :'), // Gmail
243244
array('El 19/03/2014 11:34, Juan Pérez <[email protected]> escribió:'), // Gmail in spanish
244245
array('W dniu 7 stycznia 2015 15:24 użytkownik Paweł Brzoski <[email protected]> napisał:'), //Gmail in polish

0 commit comments

Comments
 (0)