remove the
Number
function and try
Quote:
So I need a function like this one to replace all Arabic numbers by their values but other characters should stay as they are
var yas = "٠١٢٣٤٥٦٧٨٩ g";
yas = yas.replace(/[٠١٢٣٤٥٦٧٨٩]/g, function (d) { return d.charCodeAt(0) - 1632; })
.replace(/[۰۱۲۳۴۵۶۷۸۹]/g, function (d) { return d.charCodeAt(0) - 1776; });
alert(yas);