How do I separate the City, State, and Zip code from a string

336 Views Asked by At

I have a database of addresses and I want to separate them into individual strings:

Input:

#Address #1

194 RIVERSIDE DRIVE

#City, State, Zip

OYSTER BAY NY 11018

Output:

#Address #1

194 RIVERSIDE DRIVE

#City

OYSTER BAY

#State

NY

#Zip

11018

The Address #1, I could get easily because it is in a separate line but how would I go about separating the City, State, and Zip since they are on the same line and in the same string? Thank you!

0

There are 0 best solutions below