Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 1-st decision
- import re
- text = input()
- matches = re.finditer(r"\+359([ -])2\1\d{3}\1\d{4}\b", text)
- output = []
- for match in matches:
- output.append(match.group())
- print(', '.join(output))
- # 2-nd decision
- import re
- text = input()
- matches = re.findall(r"\+359 2 \d{3} \d{4}\b|\+359-2-\d{3}-\d{4}\b", text)
- print(', '.join(matches))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement