Ich hab auch sowas mal benötigt. Im Prinzip fangen alle RTF Tags mit einem \ an. Dann bis zum nächsten Blank entfernen.
Den Xbase Code finde ich auf die Schnelle nicht mehr.
Aber das ganze als SQL, musst halt umschreiben
Code: Alles auswählen
declare @pos integer;
declare @pos2 integer;
declare @text string;
if left(string,2) = '{\' then
string = substring( string, 2, length(trim(string))-3);
@pos = position('}' in string );
while @pos > 0 do
string = substring( string, @pos+1, length(string));
@pos = position('}' in string );
@pos2 = position('}' in substring( string, @pos+1, length(string)) );
if @pos2 = 0 then
leave;
end if;
end while;
string = replace(string, '\''e4', 'ä');
string = replace(string, '\''f6', 'ö');
string = replace(string, '\''fc', 'ü');
string = replace(string, '\''c4', 'Ä');
string = replace(string, '\''d6', 'Ö');
string = replace(string, '\''dc', 'Ü');
string = replace(string, '\''df', 'ß');
string = replace(string, '\par }', '');
string = replace(string, '\fs17', '');
@pos = position('\' in string );
@text = '';
while @pos > 0 do
string = substring( string, @pos+1, length(string));
@pos = position(' ' in string );
string = substring( string, @pos+1, length(string));
if @pos > 0 then
@text = @text + left(string, @pos -1 );
else
leave;
end if;
@pos = position('\' in string );
end while;
return (@text);
end if;
return(string);