I have some strings from our accounting system I need to process. The accounting system only gives the option to put in the postal code and city in one input
field. The data is later exported through xml
and imported in a php
system.
I'm looking for a way to extract the postal code from the city, however these come in various formats so a simple substr();
is not working
Some examples of the values I need to process are:
1234 ZC ALPHEN AAN DEN RIJN
1234SG UTRECHT
33602 BIELEFELD
W7 3QB LONDON
How do I split the postal code from city for each of these? I already contacted the manufacturer of the accounting system, and they understood my problem and will look into splitting the values in 2 for future calls, but that will take some time.