f:= TStringList.Create(); f.Text:= mmo1.Text; mmo1.Text := StringReplace(f.Text, 'null', '''null''', [rfReplaceAll, rfIgnoreCase]);