I need to change field dynamic and set format with this code i a formatting my zip code its text come from server end like
123456789
and this jQuery method change this value format 1234-56789
var ZIptext = $("#ZipLabel").text();
var reformat = ZIptext.replace(/(\d{5})/g, function (match) {
return match + "-";
});
$("#ZipLabel").text(reformat.replace(/\-$/, ""))
but know i am facing problem i need to change format of my fax number
3453454354
and it should be like
345-345-4354
So can someone help me