I was hoping someone may have thoughts on the following:
I presently have a bunch of files that contain the following HTML code:
<td class="jefftd">bunch of text with spaces here</td>
I need to replace these occurrences with the following:
<td class="jefftd"><span class="jeffspan">same bunch of text goes here</span></td>
I could do the first part pretty easily with a normal find and replace, ie, replacing all occurrences of <td class="jefftd"> with <td class="jefftd"><span class="jeffspan">. However then I would have an open span tag.
I thought about using regular expressions, in the form of:
FIND: <td class="jefftd">(\w+)</td>
REPLACE WITH: <td class="jefftd"><span class="jeffspan">$1</span></td>
But that doesn't work. Any thoughts on how to approach this problem? Note that there are other instances of </td> that do correspond to a plain <td> expression, so I cannot simply just find and replace the </td> with a </span></td>.
Any help is appreciated.
Thanks,
Jeff