Node.js examples for String:Algorithm
Mask String
String.prototype.ToMask = function (mascara) { var x = 1;/*from w w w. ja v a 2 s .com*/ var rp = mascara.replace(/(\w)/gi, function (match, contents, offset, s) { return "$" + x++; }); return this.replace(new RegExp(this.replace(/([\w])/gi, "([\\w])")), rp); };