so, getestet und funzt!!!
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var temp: integer;
begin
temp:=0;
RichEdit1.SelStart:=0;
while PosEx('Scheisse',RichEdit1.Text,temp) > 0 do begin
RichEdit1.SelStart:=PosEx('Scheisse',RichEdit1.Text,temp)-1;
RichEdit1.SelLength:=8;
RichEdit1.SelAttributes.Color := clBlue;
RichEdit1.SelAttributes.Style := [fsBold, fsItalic];
temp:=RichEdit1.SelStart+RichEdit1.SelLength;
end;
end;