Skip to content

Commit

Permalink
Support PH near phone number
Browse files Browse the repository at this point in the history
  • Loading branch information
lmelninkas committed Apr 23, 2024
1 parent 16ba3b4 commit 6aaf3e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyap/source_US/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ def street_type_list_to_regex(street_type_list: list[str]) -> str:

phone_number = r"""
(?:
\*?
\*?(?:[Pp][Hh]\ )?
(?P<phone_number>
\(?\d{3}\)?\-?\ ?\d{3}\-?\ ?\-?\d{4}
)
Expand Down
1 change: 1 addition & 0 deletions tests/test_parser_us.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ def test_full_street_positive(input, expected):
"input,expected",
[
# positive assertions
("P.O. BOX 10323 PH (205) 595-3511\nBIRMINGHAM, AL 35202", True),
("3602 HIGHPOINT\nSAN ANTONIO TX78217", True),
("8025 BLACK HORSE\nSTE 300\nPLEASANTVILLE NJ 08232", True),
("696 BEAL PKWY NW\nFT WALTON BCH FL 32547", True),
Expand Down

0 comments on commit 6aaf3e7

Please sign in to comment.