if pos('.asp','/itcnc1/community/hangyechaxun/index.asp')=0 then
 showmessage('not found!');

解决方案 »

  1.   

    if Pos('.asp',str)=0 then
      ShowMessage('不包含');
      

  2.   

    uses SysUtils;procedure TForm1.Button1Click(Sender TObject);
    begin
      if StrPos(PChar('.asp'), PChar('/itcnc1/community/hangyechaxun/index.asp')) <> nil then
        ShowMessage('Substring found')
      else
        ShowMessage('Substring not found');
    end;
      

  3.   

    对不起,写反了!更正:
    procedure TForm1.Button1Click(Sender: TObject);begin
      if StrPos('/itcnc1/community/hangyechaxun/index.asp','.asp' ) <> nil then
        ShowMessage('Substring found')
      else
        ShowMessage('Substring not found');
    end;
    可以了!!