I have a list of 350 addresses in a single column excel file that I need to import to a SQL table, breaking the data into columns.
content of the Excel cells is such as this one
Courtesy Motors 2520 Cohasset Rd - Chico, CA 95973-1307 530-893-1300
What strategy should I apply to import this in a clean fashion?
I was thinking
NAME <- anything before the 1st digit
STREET ADDRESS <- from the 1st digit to the '-'
STATE <- Anything from the last ',' to the '-' immediately before (the address field can contain some - )
TELEPHONE <- Last 12 char
ZIP <- 10 first char of the last 22 char
I work in C#
if this matters.
Is RegEx the appropriate approach? I'm not too familiar with them, so I'm not sure. Can somebody suggest a RegEx expression that would do the job (or part of it)?
Thanks!