I have a string of that displays like this....
1235, 3, 1343, 5, 1234, 1
I need to replace every second comma with a semicolon
i.e.
1235, 3;
var s='1235, 3, 1343, 5, 1234, 1';
s=s.replace(/([^,]+,[^,]+),/g,'$1;')
match anything that is not a comma, followed by a comma, followed by anything that is not a comma, and a comma.
replace everthing inside the parens (which doesn't include the last comma) with itself ('$1'), and add a semicolon in place of that comma.