Hola,
pues debes recorrer el richedit con un bucle, y para cada linea que debas colorear haces uso de las funciones SelStart y SelLenght y después cambias el color con el SelAttributes
Un ejemplo
Código Delphi
[-]
var r : Integer;
Linea : String;
begin
for r := 0 to richedit2.Lines.count - 1 do begin
Linea := richedit2.lines.strings[r];
if then begin
richedit2.SelStart := Pos(Linea, RichEdit2.Text); richedit2.SelLength:=Length(Linea); richedit2.SelAttributes.Color:=clred; end;
end
end;
Espero te sirva.
Saludos