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 #13 from ryayak1460/master
Browse files Browse the repository at this point in the history
Wrote a very basic address recogniser.
  • Loading branch information
ryayak1460 committed Nov 11, 2014
2 parents 3e737bd + 15643b0 commit e90e24f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@
* @return {Boolean} Does the body have an address?
**/
var hasAddress = function (text) {
// TODO - Write address recogniser.
return false;
return /^\s*(\d*)\s*([a-z]+\s*)+(([a-z]+[.]?)\s*,?)?\s*(([a-z]*\s*)*,?)?\s*(V(irgini)?a)?\s*$/i.test(text)
};

/**
Expand Down

0 comments on commit e90e24f

Please sign in to comment.