simeonshopov

Match Phone Number(re)

Feb 20th, 2020
378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. import re
  2.  
  3. text = input()
  4.  
  5. regex = '(\+359-2-[0-9]{3}-[0-9]{4}|\+359 2 [0-9]{3} [0-9]{4})\\b'
  6.  
  7. result = re.findall(regex, text)
  8.  
  9. print(', '.join(result))
Advertisement
Add Comment
Please, Sign In to add comment