JSFiddle - React, Tailwind, and code Playground
by oceog
JavaScript
function rem_word(text, word) {
return text.replace(/(\s)+/g,'$1').split(', ').filter(function (e) {
return e != word;
}).join(', ');
}
console.log(rem_word('11, 22, 33, 44, 55',55));