How to match empty content?

How to match empty content?

Assume I have the follwing simplyfied HTML code:

<td> </td>

I want to get rid of it and code therefore:

$("td").filter( function(){ return $(this).text().match(/^\s*$/) }).remove();

This works in general but unfortunately also for situation where there is no text but images like in:

<td >

<img  src="images/_banner.jpg"  alt="myimage " >

</td>

How can I modify my jquery statement mentioned above so that the <td>...</td> is kept when an image is inside?


Peter