JavaScript Obtenha o número de telefone da string
const string = 'test1 +91 9443134651 test2 +1 671-765-0091';
let phone_numbers = [];
const regexp = new RegExp("\\+?\\(?\\d*\\)? ?\\(?\\d+\\)?\\d*([\\s./-]?\\d{2,})+","g");
let match;
while ((match = regexp.exec(string)) !== null) {
console.log(`${match[0]}`);
}
// output:
//+91 9443134651
//+1 671-765-0091
//+33442207724
Pudochu