Skip to content

Instantly share code, notes, and snippets.

@agungf
agungf / cara akses pakai jquery
Created January 21, 2012 06:55
indonesia operators regex
var phoneNumber = '08111111'; //nomor yang akan di test
$.each(operators, function(service, operator) {
//console.log("%o : %o ", service, operator);
if (operator["pattern"].test(phoneNumber)) {
//do some thing with here or simple alert (for testing)
alert("%s iku cocok karo: $s -> jeneng produk'e: $s soko operator %s", phoneNumber, operator["pattern"], service, operator["name"]);
else
console.log("%s iku gak cocok: $o", phoneNumber, operator);
}