Я пытаюсь достичь:
const finalStr = "team='Core', team='Mechanics'"
//loop through string, get single quotes, add <bold>'Core'</bold>
//I want to return the string:
"team=<bold>'Core'</bold>, team=<bold>'Mechanics'</bold>"
То, что я пробовал, но, очевидно, неправильно ... не могу обернуться вокруг этого:
const finalStr = this.state.finalString
const newFinal = finalStr.match(/'(.*?)'/g).map(item => {
item = item.replace(item, '<b>' + item + '</b>')
return item;
});