My task is to convert the non-atomic (Australian)street addresses into atomic which means current street data is stored as street number and street names together. Samples are:
24 George street -----------> 24 | George street
55 park rd -----------> 55 | pard rd
102a gordon road -----------> 102a | gordon road
unit 5/46 addison ave -----------> unit 5/46 | addison ave
flat 2-9/87 north avenue-----------> flat 2-9/87| north avenue
suit 5 lvl2/55 prince hwy-------> suit 5 lvl2/55| prince hwy
shop 5 Big Shopping Centre ------> Rejected
Suit 2 Level 100 -------> Rejected
added data(the way the program should work):
Darling street ------------------> Rejected
City road -----------------------> rejected
the suggested code processed result:
Darling street ------------> Darling | Street
City road ---------------> City | road
actually in this case the code should not process the address and throw an exception.
What is the best way of splitting the addresses?