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(
- 'A prime #1 example!',
- [(r'\d+', 'sequence of digits'),
- (r'\D+', 'sequence of nondigits'),
- (r'\s+', 'sequence of whitepace'),
- (r'\S+', 'sequence of nonwhitespace'),
- (r'\w+', 'alphanumeric characters'),
- (r'\W+', 'nonalphanumeric'),
- ])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement