mystr = "check this out <a href='http://www.google.com'>Click me</a>. cool, huh?";
alert(mystr.replace(/<a\b[^>]*>(.*?)<\/a>/i,""));
Reference:
https://stackoverflow.com/questions/960156/regex-in-javascript-to-remove-links
Article ID: 46
Created On: Sat, Oct 3, 2020 at 1:11 PM
Last Updated On: Sat, Oct 3, 2020 at 1:11 PM
Authored by: Saeed Nobakht [[email protected]]
Online URL: https://www.navel.ir/article/regex-in-javascript-to-remove-links-46.html