Can somebody help me on this:
console.log('<span class="tooltip">aaaa</span><b>ok</b> <span class="tooltip">bbbb</span>'.replace('/<span .*?class="(.*?tooltip.*?)">(.*?)<\/span>/\g', ''))
I would like to remove span tags with class name .tooltip and so this to print in console "ok"
Also i would like not to trim the string so if any hidden char is present like \n
should not be removed.