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
This will strip out everything between and /a>:
mystr = "check this out Click me. cool, huh?";
alert(mystr.replace(/]*>(.*?)<\/a>/i,""));
It's not really foolproof, but maybe it'll do the trick for your purpose...