We are developing a c# application that imports address-data into a CRM-system. The CSV-file contains an address-column like 'Somethingstreet 34'. Our CRM however uses two different fields for the streetname and the housenumber. Of course, in the given example this poses no problem. But our Dutch addressing-system can be a bit of a pain.
Real world examples:
- Somestreet 88a (where 'Somestreet' is the streetname and 88a the housenumber)
- 2e van Blankenburgstraat 123a (where '2e van Blankenburgstraat' is the streetname, and '123a' is the housenumber)
- 2e van Blankenburgstraat 123-a (where '2e van Blankenburgstraat' is the streetname, and '123-a' is the housenumber)
- 2e van Blankenburgstraat 123 a (where '2e van Blankenburgstraat' is the streetname, and '123 a' is the housenumber)
Now I'm looking for a nice function (RegEx or something) that splits these addresslines correctly into two fields. Is there a nice clean way to do this ?
edit:
I did some further investigation on our addressing system and it seems (thank you government) that the above examples are not even the 'worst' ones.
Some more (these are real streets and numbers):
- Rivium 1e Straat 53/ET6 (where 'Rivium 1e Straat' is the street and '53/ET6' is the housenumber)
- Plein 1940-1945 34 (where 'Plein 1940-1945' is the street and '34' is the housenumber)
- Apollo 11-Laan 11 (where 'Apollo 11-Laan' is the street and '11' (the second one) is the housenumber)
- Charta 77 Vaart 159 3H (where 'Charta 77 Vaart' is the streetname and '159 3H' is the housenumber)
- Charta 77 Vaart 44/2 (where 'Charta 77 Vaart' is the streetname and '44/2' is the housenumber)