document.write('

解析:

var str="aaadcccdddd";

str = str.replace(/(.)\\1+/g,\'$1\');

');