This works to replace every other comma. What do I have to do to replace every third comma?
resultContent = resultContent.replace(/(,[^,]*),/g, '$1|');
This works to replace every other comma. What do I have to do to replace every third comma?
resultContent = resultContent.replace(/(,[^,]*),/g, '$1|');