Julian Smith
Julian Smith

Reputation: 1

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

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!

Upvotes: 0

Views: 407

Answers (0)

Related Questions