hozer

Untitled

Aug 25th, 2016
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. import re
  2. import pyperclip
  3.  
  4. phoneRegex = re.compile(r'''(
  5.     \+?             # plus prefix
  6.     (\d{3}|\d{1})?  # long and short country code
  7.     (\s+)?          # whitespaces
  8.     (\s|[-(]|)?     # separator
  9.     (\d{2})         # provider code
  10.     (\s|[-)]|)?     # separator
  11.     (\s+)?          # whitespaces
  12.     (\d+)           # number part
  13.     (\s|[-])?       # separator
  14.     (\d+)?          # number part
  15.    )''', re.VERBOSE)
  16.  
  17. # Todo: email regex
  18.  
  19. # Todo: find maches in clipboard text
  20.  
  21. # Todo: copy results to clipboard
Advertisement
Add Comment
Please, Sign In to add comment