Answers for "regex address"

2

address regex

d{1,5}sw.s(bw*bs){1,2}w*.
Posted by: Guest on March-04-2020
0

regex match address

const address = "One Infinite Loop, Cupertino 95014";
const cityZipCodeRegex = /^[^,\]+[,\s]+(.+?)s*(d{5})?$/;
const [_, city, zipCode] = address.match(cityZipCodeRegex) || [];
saveCityZipCode(city, zipCode);
Posted by: Guest on September-02-2021

Browse Popular Code Answers by Language