IndyFusion
Programmer
I have the following HTML:
I am using the code:
var re = "<dfn>(?:.+)<\/dfn>";
var oReg = new RegExp(re,"igm"
var result = content.replace(oReg, '');
result always comes back with null.
I am trying to remove the DFN and everything in between and it is not working. I am assuming it is because the HTML is on 3 seperate lines. I cannot control the HTML so it must stay on 3 lines. I need a way to get rid of the DFN tag and everything in between it.
I've tried using "<dfn>(?:[\s\S]+)<\/dfn>", but I get the same thing. What am I doing wrong? I've spend close to three hours working on this simple problem and can't figure it out. Can anyone PLEASE help?!
Code:
<P>test</P>
<P>test</P><DFN>
<P>test</P></DFN>
var re = "<dfn>(?:.+)<\/dfn>";
var oReg = new RegExp(re,"igm"
var result = content.replace(oReg, '');
result always comes back with null.
I am trying to remove the DFN and everything in between and it is not working. I am assuming it is because the HTML is on 3 seperate lines. I cannot control the HTML so it must stay on 3 lines. I need a way to get rid of the DFN tag and everything in between it.
I've tried using "<dfn>(?:[\s\S]+)<\/dfn>", but I get the same thing. What am I doing wrong? I've spend close to three hours working on this simple problem and can't figure it out. Can anyone PLEASE help?!