How does the replace method match all commas between parentheses?

how do I match all the commas between parentheses?
there is only one parenthesis.
the bosses used a favor in the development

.


1:

var str="jskd,123(123,123,123,lskdf,ksldfj,sldfk,),123,lsdkj";
var regex=/,(?=[^(]*\))/g;
str.replace(regex,"");

solution 2 [solve the doubts raised by netizens]:

var str="jskd,123(123,123,123,lskdf,ksldfj,sldfk,),123,lsdkj";
str.replace(/\([^()]+\)/g,function(matchStr){
    return matchStr.replace(/,/g,"");
});
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35502-2bf7d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35502-2bf7d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?