Created
May 24, 2022 12:41
-
-
Save lgolubyev/51348d842ae5203c4bf8dea6e372ddfd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const address = "One Infinite Loop, Cupertino 95014"; | |
var cityZipCodeRegex = new Regex(@"/ ^[^,\\] +[,\\\s] + (.+?)\s * (\d{ 5 })?$/").Matches(address); | |
saveCityZipCode( | |
cityZipCodeRegex[0].Value, | |
cityZipCodeRegex[1].Value | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment