Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # regex_morethan3consecutivedigits.py
- import re
- def regex(test):
- print bool(re.match('.*([0-9]{3,})',test))
- #
- regex('123')
- regex('123abc')
- regex('abc123')
- regex('12345')
- regex('abc123xyz')
- regex('12abc3') # As should be the only False as given
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement