📅  最后修改于: 2022-03-11 15:03:13.208000             🧑  作者: Mango
country_codes=['91-', 'UK-44-', 'SZ-268-22']
phone="91-123456789";
is_valid_number = country_codes.some(elem => phone.match('^' + elem));
console.log(is_valid_number );