Javascript for matching international postal addresses

I got stock on a project of a client. Target of the project is to match international postal addresses in "pure" Javascript (do not use any framework such as jQuery,...).

To describe it in detail I need a Javascript snippet which would return street, zip and city from an html source. The difficulty in this task is that it should match as many address formats as possible.

Aside from that it shouldn’t take too many resources. Regular expressions are a little bit hungry and walking through regular expressions for several countries would take a lot of resources.

Example of addresses & returns:

Address 1:

<td valign="top">

Company X GmbH<br>

Waldstr. 11<br>

D-65709 Berlin<br>




Waldstr. 11 D-65709 Berlin

Address 2:

<td class="norows" colspan="2">

Company X USA, Ltd. <br />Corporate Headquarters




<td colspan="2">

123 Williams Road<br />Little Tower, NJ 08643<br /><br />



123 Williams Road Little Tower, NJ 08643

The idea of my client is make a simple general regex to match just the zip code & city. Adding to that it should get the street by adding the line near to the line of the match.

Clients idea on example 1:

D-65709 Berlin

Should add:

Waldstr. 11

Clients idea on example 2:

Little Tower, Tower, NJ 08643

Should add:

123 Williams Road

Thanks for helping me out with this task. Before you bid you should be sure that you’re really good in regex and Javascript. This task isn’t as easy as it may looks like.

Skills: Javascript

See more: jquery postal address international, williams international, use regular expressions, this class jquery, regular expressions in c, regular expressions example, regular expressions c, regex is, regex in c, regex example, jquery regex, jquery class, example regular expressions, c regular expressions, client target, c 11 regular expressions, regex &, tower, snippet, Regex, NJ, c++ regex, c regex, br & company, berlin

About the Employer:
( 15 reviews ) Ludwigshafen, Germany

Project ID: #1158375

4 freelancers are bidding on average $200 for this job


Hello, 10+ years exp full time freelancer here, can deliver a quality & professional work in the timeframe posted. Please contact me via PM for any question, Thanks.

$200 USD in 1 day
(14 Reviews)

Thanks, Reakoo.

$250 USD in 7 days
(12 Reviews)

Ready to start and can do quick in a day. Check PM please. Thanks.

$100 USD in 1 day
(0 Reviews)

Will do it in a day

$150 USD in 1 day
(0 Reviews)

Hi, Please see your inbox.

$200 USD in 5 days
(0 Reviews)