Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- import re
- examples = [
- "please send to 13LJSSj14J8eGof3NyDoUyUijQLSwrdi7v instead because I want to scam you",
- "I sent the package, here is the tracking number 12983LTRTSA"
- ]
- RE = re.compile('([13][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{26,33})')
- for n, ex in enumerate(examples):
- s = RE.search(ex)
- if s:
- print '%d found: %s' % (n, s.groups()[0])
- else:
- print '%d not found.' % (n)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement