Advertisement
rfmonk

re_email_compact.py

Jan 2nd, 2014
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3.  
  4. import re
  5.  
  6. address = re.compile('[\w\d.+-]+@([\w\d.]+\.)+(com|org|edu)',
  7.                      re.UNICODE)
  8.  
  9. candidates = [
  10. ]
  11.  
  12. for candidate in candidates:
  13.     match = address.search(candidate)
  14.     print '%-30s %s' % (candidate, 'Matches' if match else 'No match')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement