Skip to content

Commit

Permalink
Merge pull request #32 from pbrzoski/master
Browse files Browse the repository at this point in the history
Fixed the regex detecting day in date quote header
  • Loading branch information
willdurand committed Jan 9, 2015
2 parents 799d08e + 119af2f commit bc9997d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/EmailReplyParser/Parser/EmailParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class EmailParser
'/^(Le\s.+écrit :)$/ms', // Le DATE, NAME <EMAIL> a écrit :
'/^(El\s.+escribió:)$/ms', // El DATE, NAME <EMAIL> escribió:
'/^(W dniu\s.+(pisze|napisał):)$/ms', // W dniu DATE, NAME <EMAIL> pisze|napisał:
'/^(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>:
'/^(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>:
);

/**
Expand Down
1 change: 1 addition & 0 deletions tests/EmailReplyParser/Tests/Parser/EmailParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ public function getDateFormats()
array('On Tue, 2011-03-01 at 18:02 +0530, Abhishek Kona wrote:'),
array('2014-03-20 8:48 GMT+01:00 Rémi Dolan <[email protected]>:'), // Gmail
array('2014-03-20 20:48 GMT+01:00 Rémi Dolan <[email protected]>:'), // Gmail
array('2014-03-09 20:48 GMT+01:00 Rémi Dolan <[email protected]>:'), // Gmail
array('Le 19 mars 2014 10:37, Cédric Lombardot <[email protected]> a écrit :'), // Gmail
array('El 19/03/2014 11:34, Juan Pérez <[email protected]> escribió:'), // Gmail in spanish
array('W dniu 7 stycznia 2015 15:24 użytkownik Paweł Brzoski <[email protected]> napisał:'), //Gmail in polish
Expand Down

0 comments on commit bc9997d

Please sign in to comment.