// street, city and state must be separated by '.' or ','
const addressStr = '123 Main St., New York, NY 10001, USA';
const cityAndState = addressStr
.match(/([A-Z][a-z]+s?)+,s[A-Z]{2}/g)
.toString();
console.log(cityAndState);
// New York, NY