Skip to content

Commit 7bfc22c

Browse files
committed
make regex more specific
1 parent 25e4528 commit 7bfc22c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pyap/source_US/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def str_list_to_upper_lower_regex(str_list: List[str]) -> str:
187187
numbered_road_re = r"""[Ss][Tt][Aa][Tt][Ee]\ [Rr][Oo][Aa][Dd]\ \d{1,4}(?!\d)"""
188188

189189
# Capture "Blvd of the Americas", "Ave of the Stars"
190-
street_of_re = r"""(?:(?:[Aa][Vv][Ee]\.?|[Aa][Vv][Ee][Nn][Uu][Ee]|[Bb][Ll][Vv][Dd]\.?|[Bb][Oo][Uu][Ll][Ee][Vv][Aa][Rr][Dd])\ [Oo][Ff]\ (?:[Tt][Hh][Ee]\ )?[a-zA-Z0-9\ \.\-\'\’]+)"""
190+
street_of_re = r"""(?:[a-zA-Z]{2,15}\.?\ [Oo][Ff]\ [Tt][Hh][Ee] [a-zA-Z0-9\ \.\-\'\’]+)"""
191191

192192
# Used to handle edge cases where streets don't have a street type:
193193
# eg. `55 HIGHPOINT`, `600 HIGHWAY 32`

0 commit comments

Comments
 (0)