<tr align="left">
<td width="40" height="16" align="center">
<input type="radio" name="uniqueIndex" value="01010000003121" tabindex="100"></td>
  <td  height="16"  align="center" width="66"><input type="text" name="mst1" size="20" style="font-size: 9pt; border-style: solid; text-align:center; border-width: 0 " readonly value="01010000003121">&nbsp;</td>
  <td  height="16" align="center"><input type="text" name="mst2" size="40" style="font-size: 9pt; border-style: solid; text-align:center; border-width: 0 " readonly value="梁健松">&nbsp;</td>
  <td  height="16" align="center"><input type="text" name="mst3" size="40" style="font-size: 9pt; border-style: solid; text-align:center; border-width: 0 " readonly value="北京市水湖路31-15-303">&nbsp;</td>
<td  height="16" align="center" width="65"><input type="text" name="mst4" size="10" style="font-size: 9pt; border-style: solid; text-align:center; border-width: 0 " readonly value="个体">&nbsp;</td>
<td  height="16" align="center" width="109"><input type="text" name="mst5" size="30" style="font-size: 9pt; border-style: solid; text-align:center; border-width: 0 " readonly value="340104197104213512">&nbsp;</td>
<td  height="16" align="center" width="60"><input type="text" name="mst6" size="20" style="font-size: 9pt; border-style: solid; text-align:center; border-width: 0 " readonly value="">&nbsp;</td>
<td  height="16" align="center" width="60"><input type="text" name="mst7" size="20" style="font-size: 9pt; border-style: solid; text-align:center; border-width: 0 " readonly value="5151217">&nbsp;</td>
<td align="center" width="97"><input type="text" name="mst17" size="20" style="font-size: 9pt; border-style: solid; text-align:center; border-width: 0 " readonly value="139551555519">&nbsp;</td>
<td height="16" align="center" width="97"><input type="text" name="mst19" size="20" style="font-size: 9pt; border-style: solid; text-align:center; border-width: 0 " readonly value="市局">&nbsp;</td>
<td height="16" align="center" width="97"><input type="text" name="mst20" size="20" style="font-size: 9pt; border-style: solid; text-align:center; border-width: 0 " readonly value="北京合肥市">&nbsp;</td>
<td  height="16" align="center" width="97"><input type="text" name="mst8" size="30" style="font-size: 9pt; border-style: solid; text-align:center; border-width: 0 " readonly value="">&nbsp;</td>
    </tr>以上字符串如何去其中的每个VALUE对应的引号值呢?

解决方案 »

  1.   

    var
      s:Widestring;
      posIndex:Integer;
      StrList:TStringList;
    begin
      StrList:= TStringList.Create;
      s:='border value="北京合肥市" border borderborder value="北京合肥市1" border borderborder value="北京合肥市2" border border?';
      posIndex:=pos( 'value',s );
      while posIndex > 0 do
      begin
        s:=copy( s,posIndex+7,length(s) );
        PosIndex:=pos( '"',s );
        if PosIndex > 0 then
          StrList.Add( copy( s,0,PosIndex-1 ) );    s:=Copy( s,PosIndex+1,length( s ) );
        posIndex:=Pos( 'value', s );
      end;
      self.ListBox1.Items.Assign( strList );
    end;
    --listbox显示结果
    北京合肥市
    北京合肥市1
    北京合肥市2
      

  2.   

    如果是完整的html文件,可以用IHtmlDocument2解决
      // 用webbrowser分析html文件 
      webbrowser1.Navigate('test.html');
      Memo1.Lines.Add(IHtmlDocument2(WebBrowser1.Document).Body.OuterText);