I have a javascript string contains html table like this:
<div class="nobrtable"><table class="at"><TBODY><TR><td> FY
</TD><td> Profit Margin
</TD><td> Asset Turnover
</TD><td> RoA
</TD><td> Leverage Ratio
</TD><td> RoE
</TD><td> Cash Conversion
</TD><td> Cash RoE
</TD><td> RoC
</TD></TR><TR><td> 2002
</TD><td> 5.1%
</TD><td> 1.42
</TD><td> 7.2%
</TD><td> 127%
</TD><td> 9.2%
</TD><td> 163%
</TD><td> 14.9%
</TD><td> 16.9%
</TD></TR>
</TD></TR></TBODY></table></div>
How could I using regular expression to remove all the '
' in the table? Otherwise it is too long.
I tried using
ele = ele.replace(/
/g, ' ');
It will replace all the '
' in my string. I just want to remove all the '
' in all the html tables.
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…