How to split address to get city

Here is code for extracting city, state and code:

Regex.Match(Address,"(.*?), ([A-Z]{2}) (\d+)").Groups(1).ToString
Regex.Match(Address,"(.*?), ([A-Z]{2}) (\d+)").Groups(2).ToString
Regex.Match(Address,"(.*?), ([A-Z]{2}) (\d+)").Groups(3).ToString

Capture

1 Like