Hi all,
var str = “<td charts=”ExcelGraph1,ExcelGraph2″ formula=”1″ standard=”” style=”border-right: 1px solid rgb(228, 227, 201); border-bottom: 1px solid rgb(228, 227, 201); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Arial; font-size: 10pt; text-align: left;” class=”cell” id=”cell-4-2″ cellvalue=”1″><div class=”nowrap”>1</div></td>”;
From the above string, I need to replace the charts attribute with “” using RegEx, I tried like this,
str = str.replace(/charts.*ExcelGraph.
str = “<table><img style=”display:none;” class=”charts” id=”ExcelGraph1″ src=”/test.chart/jfreechart2999.png” height=”200″ width=”300″>
<img id=”spacer” src=”spacefr.gif”><img style=”display:none;” class=”charts” id=”ExcelGraph2″ src=”/test.chart/jfreechart2930.png” height=”200″ width=”300″ ><table></table>”;
From the above string, I need to remove the img tags with id starting with “ExcelGraph” using RegEx, I tried like this,
str = str.replace(/<img.*id.
Thanks & Regards,
Suresh.