var aDoc = app.activeDocument;
var aTFrame = aDoc.textFrames;
var aString = "50*";
for (i=aTFrame.length-1; i>0; i--) {
contentString = aTFrame.contents;
if (contentString.indexOf(aString) != -1) { //if 50* present in the text frame
//aTFrame.selected = true;
//alert (contentString);
aTFrame.contents = contentString.replace (/50\*/g, '50');
}
}