jakul/email-reply-parser — pull request #3 by psychok7 (2014-06-05 14:44:23+00:00)
Title: new regex for removing signature

@jakul Removing specific nhs signature.

```
Dr Santamaria & Partner
Office No: 020 7411 6877/6882 / fax 6867

Manor Health Centre
86 Clapham Manor Street
London
SW4 6EB
P Please consider the environment before printing this e-mail
This message may contain confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. Any unauthorised disclosure of the information contained in this e-mail is strictly prohibited.

E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission
```

```
(Pdb) print message.fragments
[, ]
(Pdb) print message.fragments[1].content
Dr Santamaria & Partner
Office No: 020 7411 6877/6882 / fax 6867

Manor Health Centre
86 Clapham Manor Street
London
SW4 6EB
P Please consider the environment before printing this e-mail
This message may contain confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. Any unauthorised disclosure of the information contained in this e-mail is strictly prohibited.

E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission
(Pdb) print message.fragments[0].content

(Pdb) q
```

tests:

```
(networklocum)administrator@vagrant-khan:/src/email-reply-parser$ python setup.py test
running test
running egg_info
writing email_reply_parser.egg-info/PKG-INFO
writing top-level names to email_reply_parser.egg-info/top_level.txt
writing dependency_links to email_reply_parser.egg-info/dependency_links.txt
reading manifest file 'email_reply_parser.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'VERSION'
writing manifest file 'email_reply_parser.egg-info/SOURCES.txt'
running build_ext
test_captures_date_string (test.test_email_reply_parser.EmailMessageTest) ... ok
test_complex_body_with_one_fragment (test.test_email_reply_parser.EmailMessageTest) ... ok
test_deals_with_windows_line_endings (test.test_email_reply_parser.EmailMessageTest) ... ok
test_email_one_is_not_on (test.test_email_reply_parser.EmailMessageTest) ... ok
test_multiline_reply_headers (test.test_email_reply_parser.EmailMessageTest) ... ok
test_reads_bottom_message (test.test_email_reply_parser.EmailMessageTest) ... ok
test_reads_top_post (test.test_email_reply_parser.EmailMessageTest) ... ok
test_reply_is_parsed (test.test_email_reply_parser.EmailMessageTest) ... ok
test_sent_from_iphone (test.test_email_reply_parser.EmailMessageTest) ... ok
test_simple_body (test.test_email_reply_parser.EmailMessageTest) ... ok
test_verify_reads_signature_correct (test.test_email_reply_parser.EmailMessageTest) ... ok
test_Regards (test.test_email_reply_parser.NHSNETEmailMessageTest) ... ok
test_best_regards (test.test_email_reply_parser.NHSNETEmailMessageTest) ... ok
test_confidential (test.test_email_reply_parser.NHSNETEmailMessageTest) ... ok
test_email_disclaimer (test.test_email_reply_parser.NHSNETEmailMessageTest) ... ok
test_intended_recipients_only (test.test_email_reply_parser.NHSNETEmailMessageTest) ... ok
test_kind_regards (test.test_email_reply_parser.NHSNETEmailMessageTest) ... ok
test_many_thanks (test.test_email_reply_parser.NHSNETEmailMessageTest) ... ok
test_nhs_net_quoting (test.test_email_reply_parser.NHSNETEmailMessageTest) ... ok
test_nhs_net_quoting2 (test.test_email_reply_parser.NHSNETEmailMessageTest) ... ok
test_nhs_net_quoting3 (test.test_email_reply_parser.NHSNETEmailMessageTest) ... ok
test_nhs_net_quoting4 (test.test_email_reply_parser.NHSNETEmailMessageTest) ... ok
test_nhs_remove_signature (test.test_email_reply_parser.NHSNETEmailMessageTest) ... ok
test_regards (test.test_email_reply_parser.NHSNETEmailMessageTest) ... ok
test_regards_signature (test.test_email_reply_parser.NHSNETEmailMessageTest) ... ok
test_sent_from_samsung_mobile (test.test_email_reply_parser.NHSNETEmailMessageTest) ... ok
test_stars (test.test_email_reply_parser.NHSNETEmailMessageTest) ... ok
test_underscores (test.test_email_reply_parser.NHSNETEmailMessageTest) ... ok

----------------------------------------------------------------------
Ran 28 tests in 0.045s

OK
```