alert("ab;01;41:cd;22;a0;0".replace(/(\d);(\d)/g, function (str, p1, p2, offset, s) { return p1 + "," + p2; }));