Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- from re_test_patterns import test_patterns
- test_patterns(
- 'abbaabbba',
- [('[ab]', 'either a or b'),
- ('a[ab]+', 'a followed by 1 or more a or b'),
- ('a[ab]+?', 'a followed by 1 or more a or b, not greedy'),
- ])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement