Code: Alles auswählen
uses regexpr;
try
r:=TRegExprEngine.Create(UTF8Decode(edPattern.Text));
for i:=0 to Dictionary.Count-1 do
begin
x:=0; y:=0;
if r.MatchString(UTF8Decode(Dictionary[i]), x, y) then
begin
sgSearchResult.RowCount:=sgSearchResult.RowCount+1;
sgSearchResult.Cells[0,sgSearchResult.RowCount-1]:=Dictionary[i];
end;
end;
finally
r.Free;
end;
Code: Alles auswählen
case Encoding of
'ISO_8859_1' : s:=UTF8ToSingleByte(Dictionary[i],@UnicodeToISO_8859_1)
'CP1250': s:=UTF8ToSingleByte(Dictionary[i],@UnicodeToCP1250);
end;
if r.MatchString(s, x, y) then...