Skip to content

1957-delete-characters-to-make-fancy-string

DevGod
DevGod
Vtuber
/**
* @param {string} s
* @return {string}
*/
var makeFancyString = function(s) {
const nya = new RegExp("(.)\\1{2,}", 'g');
return s.replace(nya, "$1$1");
};