JSFiddle - React, Tailwind, and code Playground
JavaScript
let fff = function( v ) {
return v.replace(/хо/gi, (match, offset) => {
console.log( match );
console.log( offset );
return '<strong>' + match + '</strong>';
});
}
console.log( fff( "Хо-fff-Хо-хо" ) );