这是个html文件<body topmargin="0">
<title>网页标题</title>
<table width=100% cellspacing=0 cellpadding=0>
<tr>
 <td class=inputcontent>
  <table width=100% cellspacing=0 cellpadding=0 class=TBborder>
  <tr class=TBtitle style="height:19;padding:2px 2px">
    <td style="font-size:12px" align=left>如何获取到 网页标题 并保存为 网页标题.html

解决方案 »

  1.   

    可以按文本文件来打开,查找到这个<title>字符串,那么在<title>和</title>之间的就是你要得到 的文件名,然后再另存为一个html文件就可以了另外取<title>和</title>还可以用正则表达式来分析下,然后保存
      

  2.   

    很多查找替换工具支持通配符以及正则表达式。
    你可以参考 Search & Replace这个软件。
      

  3.   

    读取文件就不用说了吧.
    假设文件的内容已被读入一字符串 htmfunction getTitle(const htm: string):string;
    var p1,p2:cardinal;
    begin
           p1 := pos('<title>',htm);
           p2 := pos('</title>',htm);
           if (p1>0) and (p2>p1) then
                 result := copy(htm,p1 + 7,p2-p1 - 7)
           else
                 result := '';
    end;把取得的字符串写入文件名当然,更复杂的匹配,就需要正则表达式了.