I need a regex that detects words inside a string. My regex works fine when the class consists of a single word, but not for multiple words.
function repl(string){
return string.replace(/<span class="[a-z\s\-\b \b]*">/ , (n)=>{
return <Symbol/>
}
}
Works:
repl('<span class='hi'>') /==> <Symbol/>
Does not work:
repl('<span class='hi hi'>')