The following regular expression search & replace function will apply an alternating class to every other TR row... e.g. it will turn this:
Code: <tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
...
into this:
Code: <tr class="odd">
<td></td>
</tr>
<tr class="even">
<td></td>
</tr>
<tr class="odd">
<td></td>
</tr>
<tr class="even">
<td></td>
</tr>
...
Here's the search & replace function... It works in Dreamweaver MX, but it will probably work as is or with slight modification in any application which supports regular expressions (e.g. EditPad, etc.):
Find in: Selected Text
Search: Source Code
Find:
(<tr)([^>]*>[\S\s]*?</tr>[\S\s]*?<tr)([^>]*>[\S\s]*?</tr>)
Replace:
$1 class="odd"$2 class="even"$3
Dreamweaver search options: Only 'Regular Expressions' should be checked
Figuring out a way to do this has saved me lots of time, so I just figured I'd pass it on.