Search row with highest number of cells in a row with colspan
- by user593029
What is the efficient way to search highest number of cells in big table with numerous colspan (merge cells ** colspan should be ignored so in below example highest number of cells is 4 in first row). Is it js/jquery with reg expression or just the loop with bubble sorting. I got one link as below explainig use of regex is it ideal way ... can someone suggest pseudo code for this.
High cpu consumption due to a jquery regex patch
<table width="156" height="84" border="0" >
<tbody>
<tr style="height:10px">
<td width="10" style="width:10px; height:10px"/>
<td width="10" style="width:10px; height:10px"/>
<td width="10" style="width:10px; height:10px"/>
<td width="10" style="width:10px; height:10px"/>
</tr>
<tr style="height:10px">
<td width="10" style="width:10px; height:10px" colspan="2"/>
<td width="10" style="width:10px; height:10px"/>
<td width="10" style="width:10px; height:10px"/>
</tr>
<tr style="height:10px">
<td width="10" style="width:10px; height:10px"/>
<td width="10" style="width:10px; height:10px"/>
<td width="10" style="width:10px; height:10px" colspan="2"/>
</tr>
<tr style="height:10px">
<td width="10" style="width:10px; height:10px" colspan="2"/>
<td width="10" style="width:10px; height:10px"/>
<td width="10" style="width:10px; height:10px"/>
</tr>
</tbody>
</table>