var str = '(#24174#||#22301#||#22298#||#22303#)'
var str = '(#24174#||#22301#||#22298#||#22303#)'; alert('>'+str.replace(/([^#]*)?\(.+\)([^#]*)?/g,'')+'<');