let sentence = "Hello+world + like+ this + name,bla";
sentence = sentence.replace(/\+\s\+/g, function(match){
return "*" + match.trim() + "*";
});
alert(sentence); // Output will be " *Hello*+*world*+like*+this*+name,*bla* ";
How can I achieve this using JavaScript and regular expressions?