javascript - Match each address from the address number to the 'street type' -


i have paragraph of text contains following addresses:

  • at 900 greenwood st.
  • in 500 block of main street
  • at 670 w. townline ave.
  • before 1234 river avenue
  • of 1125 main ave.

i want match each address address number 'street type' (ave., street, lane, road, rd., etc.) except for addresses begin word of.

so of addresses above, statement match:

900 greenwood st. 500 block of main street 670 w. townline ave. 1234 river avenue

and not match:

1125 main ave.

as far know, there isn't 1 simple regex pattern kind of complicated task. there many variables cover 1 pattern work reliably. first guess "street", "ave", etc., if street name doesn't have suffix (i.e. 999 la canada)? phrase between "at", "in" or "before", if 1 of phrases isn't address? see mean?

my suggestion take @ lingua::en::addressparse perl.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -