Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- import pyperclip
- phoneRegex = re.compile(r'''(
- \+? # plus prefix
- (\d{3}|\d{1})? # long and short country code
- (\s+)? # whitespaces
- (\s|[-(]|)? # separator
- (\d{2}) # provider code
- (\s|[-)]|)? # separator
- (\s+)? # whitespaces
- (\d+) # number part
- (\s|[-])? # separator
- (\d+)? # number part
- )''', re.VERBOSE)
- # Todo: email regex
- # Todo: find maches in clipboard text
- # Todo: copy results to clipboard
Advertisement
Add Comment
Please, Sign In to add comment