var source = 'a、b、c(d、e)';var result = source.split(/、(?![^(]*?))/);console.log(result);console.log(result.join('').replace(/(|)|、/g,function(m){ return {'(':'(',')':')','、':','}[m];}));