Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #15 from ryayak1460/master
Browse files Browse the repository at this point in the history
Included numbered streets and abbreviated street names.
  • Loading branch information
ryayak1460 committed Nov 11, 2014
2 parents 54c2184 + 4465db7 commit e2b815a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
* @return {Boolean} Does the body have an address?
**/
var hasAddress = function (text) {
return /^\s*(\d*)\s*([a-z]+\s*)+(([a-z]+[.]?)\s*,?)?\s*(([a-z]*\s*)*,?)?\s*(V(irgini)?a)?\s*$/i.test(text)
return /^\s*(\d*)\s*(([a-z]+[.]?|\d*(1st|[23]n?d|[4-9]th))\s*)+(([a-z]+[.]?)\s*,?)?\s*(([a-z]*\s*)*,?)?\s*(V(irgini)?a)?\s*$/i.test(text)
};

/**
Expand Down

0 comments on commit e2b815a

Please sign in to comment.