Search row with highest number of cells in a row with colspan
<p>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.</p>

<p><a href="http://stackoverflow.com/questions/8990653/high-cpu-consumption-due-to-a-jquery-regex-patch">High cpu consumption due to a jquery regex patch</a></p>

<pre><code>&lt;table width="156" height="84" border="0" &gt;
    &lt;tbody&gt;
        &lt;tr style="height:10px"&gt;
            &lt;td width="10" style="width:10px; height:10px"/&gt;
            &lt;td width="10" style="width:10px; height:10px"/&gt;
            &lt;td width="10" style="width:10px; height:10px"/&gt;
            &lt;td width="10" style="width:10px; height:10px"/&gt;
        &lt;/tr&gt;
        &lt;tr style="height:10px"&gt;
            &lt;td width="10" style="width:10px; height:10px" colspan="2"/&gt;
            &lt;td width="10" style="width:10px; height:10px"/&gt;
            &lt;td width="10" style="width:10px; height:10px"/&gt;
        &lt;/tr&gt;
        &lt;tr style="height:10px"&gt;
            &lt;td width="10" style="width:10px; height:10px"/&gt;
            &lt;td width="10" style="width:10px; height:10px"/&gt;
            &lt;td width="10" style="width:10px; height:10px" colspan="2"/&gt;
        &lt;/tr&gt;
        &lt;tr style="height:10px"&gt;
            &lt;td width="10" style="width:10px; height:10px" colspan="2"/&gt;
            &lt;td width="10" style="width:10px; height:10px"/&gt;
            &lt;td width="10" style="width:10px; height:10px"/&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
</code></pre>
