JSFiddle - React, Tailwind, and code Playground

by docluv

JavaScript

var regex = /<a\b[^>]*>(.*?)<\/a>/ig;
var body = "<a href="">test</a>";
var result = body.replace(regex, "");
alert(result);

//<TAG\b[^>]*>(.*?)</TAG>