4 MINDS

4MINDS Gestão de Conhecimento

Dart filter number from string




Dart filter number from string



var toPhone = (phone) {
var regex = new RegExp(r"(\w+)");
var results = regex.allMatches(phone).map((m) => m[0]).toList();
return results.join();
};

var phone = toPhone("(54) 999.767.081");