字符串过滤问题 我用idhttp获取网页代码,保存到一个字符串变量中,然后要做一个过滤已知过滤的头尾两个内容如: <div id="aaaaa" / </p></div><div>如何获取其中的代码?其实就是一个页面的网页采集下来了,如何进行处理?希望有详细的代码谢谢!!!!另,采集的页面有时候会有?号(正确情况应为中文),怎么办? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 最好的办法是用 正则表达式了最方便的是用 Pos() 了 pos和正则都可TRegExpr正则表达式http://hi.baidu.com/program8/blog/item/31800b0801b32030e824885f.html while pos('',yourGatheredStr) >0 thenbegin yourNeededContext := copy(yourGatheredStr, pos('startWith',yourGatheredStr) , pos('endWIth'yourGatheredStr) ); doProcess; delete(yourGatheredStr,1,pos('endWIth'yourGatheredStr) );end; 唉,delphi做这个真难受呀,只好用c#了 资源文件能不打入EXE吗 算是进阶的问题吧!在Delphi里,如何返回一个不同数据库源表的数据集? 关于TChart组件的问题,在线等待!!!!! 在主模块中怎么调用模块 100分求资料文档 DELPHI FOR .NET在BS结构中的应用 最好有关SQL数据库方面的 无也行 大家看看我这条SQL语句有什么问题? Bookmark做什么用的,有什么功能?在线等侍! 紧急求助!!! 有在东莞工作的朋友吗?进来领分。 请问我有一段SQL语句,如果在DELPHI中建立数据表呢? 用dbgrideh如何使其只能从picklist中选择数据,而不能输入数据? 关于时间计算的问题
http://hi.baidu.com/program8/blog/item/31800b0801b32030e824885f.html
while pos('',yourGatheredStr) >0 then
begin
yourNeededContext := copy(yourGatheredStr,
pos('startWith',yourGatheredStr) ,
pos('endWIth'yourGatheredStr) );
doProcess;
delete(yourGatheredStr,1,pos('endWIth'yourGatheredStr) );end;