Advertisement
rfmonk

re_charset.py

Jan 2nd, 2014
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3.  
  4. from re_test_patterns import test_patterns
  5.  
  6. test_patterns(
  7.     'abbaabbba',
  8.     [('[ab]',       'either a or b'),
  9.      ('a[ab]+',     'a followed by 1 or more a or b'),
  10.      ('a[ab]+?',    'a followed by 1 or more a or b, not greedy'),
  11.      ])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement