One friend asked me this and as my knowledge on RegExp is not so good yet here I am.
How can exclude the HTML tags from this string?
re<br>na<br>to<br>galvao
I've tried some RegExp but it didn't work as I was expecting.
(.*)<.*>(.*)
But this RegExp gets the first < and the last >.
Any ideas?
this is a quick way to do it:
var content = "re<br>na<br>to<br>galvao";
content = content.replace(/<[^>]*>/g,'');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With