源自:1-1 正则表达式历史背景与发展历程
正则表达式HTML脚本
http://ckarea.com/bbs/forum.php?mod=forumdisplay&fid=468&page=1
http://ckarea.com/bbs/forum.php?mod=forumdisplay&fid=468&page=2
.
http://ckarea.com/bbs/forum.php?mod=forumdisplay&fid=468&page=10
请教如何用正则表达式,只获取page=1,其余均过滤掉,
这脚本语法分别代表甚么意思
if (string.find(HTML.Url,'-%d+')) then
local s,e=string.find(HTML.Content,'fullview');
if (s and e) then
s=string.find(HTML.Content,'http',e+1);
if (s) then
e=string.find(HTML.Content,'jpg',s+5);
if (e) then
local url=string.sub(HTML.Content,s,e+2);
url=string.gsub(url,'\\/','/');
AddLink(url,HTML.Url,HTML.Title,'',HTML.TaskID,0);
end
end
end
else
DefaultParser(HTML.Content,HTML.Url,HTML.Title,HTML.TaskID,HTML.Level);
end
提问者:chuan03263902902
2016-08-30 09:21