I have a string in JavaScript and it includes an a tag with an href. I want to remove all links and the text. I know how to just r
If you only want to remove elements, the following should work well:
s.replace(/]+>[^<]*<\/a>/, '');
This should work for the example you gave, but it won't work for nested tags, for example it wouldn't work with this HTML:
Google