写个有可读性的。
```
const source = '(a,(b,(c,(d,(e,(f))))))';
const sourceList = source.split('');
const charList = [];
const keyList = [];
// Find Char & Key
sourceList.map((char, i) => {
if (/[a-z]/i.test(char)) {
charList.push(char);
keyList.push(i);
}
});
// Replace sourceList String
keyList.map((key, i) => {
sourceList[key] = charList.reverse()[i];
});
// (a,(b,(c,(d,(e,(f))))))
console.log(source);
// (f,(b,(d,(d,(b,(f))))))
console.log(sourceList.join(''));
```
https://gist.github.com/SolidZORO/d30fdac96fd00af1be9b77e2c64ab9fa