You can iterate over the .contents()
of your <div>
until you find the required text node, whose contents you can then modify by altering its .nodeValue
property.
$('div').contents().each(function() {
if (this.nodeType === 3 && this.nodeValue.match(/Change/)) {
this.nodeValue = "I've been changed!";
}
});
A better solution though would be to wrap the original text node in a <span>
so that you can access it directly via DOM selectors. You could perform that wrapping automatically (i.e. using JS code, not by changing the source) when the page is first loaded, and then use normal jQuery selectors and methods.