var sString: string; iPos,iLen: integer; begin sString:= 'http://www.3464.com/article.asp?articleid=4750'; iLen:= Length(sString); iPos:= Pos('/',sString); if iPos=0 then Exit; sString:= Copy(sString, iPos+2,iLen-iPos); iPos:= Pos('/',sString); if iPos=0 then Exit; sString:= Copy(sString, 1,iPos-1); end;