what is the regex pattern for the string
<3
and
:)
I have tried /<\s*3/g /<\d*3/g /<\.*3/g for <3 but its not working.
it is matching in online regex editor but not working on my system.
el.innerHTML = el.innerHTML.replace(/<\s*3/g, '<img src="./img/heart-red.png" alt=""/> ')
Try
/<3/gand/(?:<|<)3/g, It should work.