Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.

Commit 260bf84

Browse files
authored
Change phone number regex to be less strict. (#16)
1 parent 0f4307c commit 260bf84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vaccine_feed_ingest_schema/location.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# Less strict than spec so normalizers don't need to encode phone numbers exactly
2929
# e.g. (444) 444-4444, +1 (444) 444-4444
3030
US_PHONE_RE = re.compile(
31-
r"^(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:\#|x\.?|ext\.?|extension)\s*(\d+))?$" # noqa: E501
31+
r"^(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(([0-9]{3})\)|([0-9]{3}))\s*(?:[.-]\s*)?)?([0-9]{3})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:\#|x\.?|ext\.?|extension)\s*(\d+))?$" # noqa: E501
3232
)
3333

3434
# Lowercase alpha-numeric and underscores

0 commit comments

Comments
 (0)