Advertisement
rfmonk

re_findall.py

Dec 30th, 2013
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.14 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. import re
  4.  
  5. text = 'abbaaabbbbaaaaa'
  6.  
  7. pattern = 'ab'
  8.  
  9. for match in re.findall(pattern, text):
  10.     print 'Found "%s"' % match
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement