I am having an input string and i need to replace all the tags in the string with blank space and it works fine.but i does't want to select the tag that is inside the "title" attribute.
This is my Input string
var temp='<div title="Minimum Standards for <mark>Child</mark> Protection in Humanitarian Action (CPMS) | content of" >
<mark>Child</mark>
</div>';
This is my regular expression code to replace the string.
temp = String(temp).replace(/(<mark[^>]*>|<\/mark>)/g, '');
I only need to match the mark tags that is outside the "title" attribute or i just want to ignore the mark tags inside the "title" attribute,I need a regular expression for the same.Thanks in advance.