Consecutive Search and Replace

Input





See regex101.com > Javascript
Output