Advertisement
Typhoon

E-Mail Match

Apr 11th, 2015
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3.  
  4. import re
  5.  
  6. match = re.search(r'([\w.-]+)@([\w.-]+)', r'tomas@example.sk' )
  7. print match.group()
  8. print match.group(1)
  9. print match.group(2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement