function GetDelimiteredStringN(Astring:String;Dlmter:Char;nPos:integer):string; var sList:TStringList; begin Result:=''; sList:=TStringList.Create; sList.Text:=StringReplace(Astring,Dlmter,#13#10,[rfReplaceAll]); if (nPos>0) and (sList.Count>=nPos) then Result:=sList[nPos-1]; end; procedure TForm1.Button1Click(Sender: TObject); var str : TStringList; begin str := TStringList.Create; str.Delimiter := ','; str.DelimitedText :=memo1.text; edit1.text:=str.Text; //showmessage(str.Text); end; procedure TForm1.Button2Click(Sen der: TObject); begin edit1.Text:=(GetDelimiteredStringN(memo1.text,',',1));//第3个*后的字符. edit2.Text:=(GetDelimiteredStringN(memo1.text,',',2));//第3个*后的字符. edit3.Text:=(GetDelimiteredStringN(memo1.text,',',3));//第3个*后的字符. end;