JSFiddle - React, Tailwind, and code Playground
by edelman
JavaScript
function wrapNum(str) {
return str.replace(/\d+/, '<span>$&</span>');
}
console.log(wrapNum('the 20 best people evarr'));
by edelman
function wrapNum(str) {
return str.replace(/\d+/, '<span>$&</span>');
}
console.log(wrapNum('the 20 best people evarr'));