Inspired from the post JQuery changing content of table cell , I am trying to modify the content of table cells containing a particular string which includes non breaking white spaces or equivalently  , but I can’t seem to make it work in my case.
Html code:
<table id='table1'>
<tr>
<td> a</td>
<td>b</td>
</tr>
</table>
JQuery:
$("#table1 td:contains(' a')").html("hallo");
It has no effect.
Another question: Is there a selector stricter than contains, selecting only the cells with exactly a given string?
If you use .filter(), you can select elements based on any custom criteria you want.
or to answer your other question:
This is a lot more robust than writing convoluted selector strings.