I have a string and I want to remove this data like this \(f(x) = (a+b)\)
so i am thinking to get all subsstring and then make some operation on array. But it is giving me only one stripedHtml. So not able to get how to clean it. Just wants to remove this equations.
Result will be : Here’s the evidence
const filter_data = `<p>\(f(x) = (a+b)\)</p><p>\(f(x) = (a+db)\)</p><p>\(f(x) = (a+d+c+b)\)</p>
<p>Here’s the evidence.</p>`
var strippedHtml = filter_data.substring(
filter_data.lastIndexOf("\(") + 1,
filter_data.lastIndexOf("\)")
);
console.log(strippedHtml)