diff --git a/pyap/source_US/data.py b/pyap/source_US/data.py index 07f9086..af95800 100644 --- a/pyap/source_US/data.py +++ b/pyap/source_US/data.py @@ -317,7 +317,7 @@ def street_type_list_to_regex(street_type_list): ) | (?: - \#[0-9]{,3}[A-Za-z]{1} + \#[0-9]{0,4}[A-Za-z]{0,1} ) )\ ? ) diff --git a/test_parser.py b/test_parser.py index 7ddd319..c9557c5 100644 --- a/test_parser.py +++ b/test_parser.py @@ -84,3 +84,8 @@ def test_parse_address(): addresses = ap.parse(test_address) assert addresses[0].full_address == \ "225 E. John Carpenter Freeway, Suite 1500 Irving, Texas 75062" + + test_address2 = "225 E. John Carpenter Freeway, #1500 Irving, Texas 75062" + addresses2 = ap.parse(test_address2) + assert addresses2[0].full_address == \ + "225 E. John Carpenter Freeway, #1500 Irving, Texas 75062"