blob: 6d8d7992d0aed780061bc713cc370127f1e31acf [file] [log] [blame] [edit]
import typing
import re
for test_string in ['555-1212', 'ILL-EGAL']:
if re.match(r'^\d{3}-\d{4}$', test_string):
print(test_string, 'is a valid US local phone number')
else:
print(test_string, 'rejected')