# [JavaScript (Node.js)], 60 bytes <!-- language-all: lang-javascript --> f=(a,b=a.replace(/\(...\)/,c=>c[c[2]>'='?3:1]))=>a==b?b:f(b) [Try it online!][TIO-kkrn9wig] [JavaScript (Node.js)]: https://nodejs.org [TIO-kkrn9wig]: https://tio.run/##TVFBbsJADLzvK3JibUEXtb2B15z6CkAiSRNKlRIUol6qvj312htUKXJi78x4dvJZfpf3erjcxqdr/95MUxuhXFWxDENz68q6gfUBQggHXK/qyPW@3r8c2Ue/e908HxEjlzFWu2rTQoXTWMTi5JjJEQExoQNmRulBemKUQogkPbAcEcqIZZ4xJFMSgmBA51IUk2jCSa80Vapt0EYYci6KxtJFMszAPBRG0kiKVpIhqYZh1SKzicmvAe0C8xpOy8ms604ne7IxzoJq2WVb8uRTVoNsCSSnxP9Nsfnh7IGyM9ZzJoOwUdlcYQ4gfYuGhZID1WJahiSe99Djluku@kUmxbMWPbJVOs@J8ZyYOnWP6MHwKerZffoZuk3CPIVxuHwBhvutu4zgD1ePWzeGth/eyvoDuiJy8eOKou6v975rQtefoVssWvDgl93SoxeVX9xOfw "JavaScript (Node.js) – Try It Online"