Action Directory / Phone Numbers

Install

Shared by 1writerapp

Script

var regex = /(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}/g
var matches = editor.getText().match(regex);
if (matches) {
    ui.list('Phone Numbers', matches, false, function(a, b) {
        if (a) {
            app.openURL('tel://' + encodeURI(a));
        }
    });
}