次のサブルーチンは、基本的に比較的良い一般的な一致と見なすことができます。 (PS:Code_liteがUBBを逃れたことに突然気づきました!!!私はめまいがして逃げなければならなかった...)
dimobjregexp、matches、i、dc9_dot_cn_match
dimarymatch()
RedimpreServearyMatch(0)
setobjregexp = newRegexp
objregexp.ignorecase = true
objregexp.global = true
objregexp.pattern = "(?:/[[^/]]+/]([^/[]+)/[// [^/]]+/])|(?:(?:href | src)=([^/s |^>]+)[" "|> |/s/'])"
setMatches = objregexp.execute( "[img] 2312.jpg [/img] [img] 2312.jpg [/img] hh [img] http://www.dc9.cn/cm/upload/2ed312.jpg [/img] <ahref=""http://www.dc9.cn/ddd。 jpg ""> </a> href = "" http://www.dc9.cn/dccdd.jpg "" "> [img_right = 400,300、title] upload/2assas.jpg [/img_right] <seccedsrc =" "http://ww.dc9.dc9.dc9.dc9.dc9.dc9.dcne
dimtmpmatch
fori = 0tomatches.count-1
callinsertdatatoarray(matches(i).submatches(0)、arymatch)
callinsertdatatoarray(matches(i).submatches(1)、arymatch)
次
fori = 0toubound(arymatch)
ifnotisnull(arymatch(i))andtrim(arymatch(i))<> "" thenresponse.writearymatch(i)& "<br>"
次
functionInsertDatatoArray(データ、byfefarymatch)
iftrim(data)<> "" then
データ=置換(data、 "'"、 "")
データ=置換(data、 "" ""、 "")
データ=置換(data、 "/"、 "/")
data = split(data、 "/")(ubound(split(data、 "/")))
RedimpreServearymatch(ubound(arymatch)+1)
dc9_dot_cn_match = false
forj = 0toubound(arymatch)
ifarymatch(j)= dataShendc9_dot_cn_match = true
次
ifnotdc9_dot_cn_matchthenarymatch(ubound(arymatch))= data
endif
エンド機能
実際、Z-Blogが使用されている場合、アップロードを一致させるだけで十分です(ただし、トラブルを節約し、より正確にするために、上記の一致にアップロードを追加するだけであるため、次のものはより複雑になるようです。実際、理論的には、次のものはより単純であるはずです。分割は必要ありません/。このように書くには:
dimobjregexp、matches、i、zc_upload_match
dimarymatch()
RedimpreServearyMatch(0)
setobjregexp = newRegexp
objregexp.ignorecase = true
objregexp.global = true
objregexp.pattern = "(?:/[[^/]]+/] [^/[]*upload //([^/[|^// |^//]+)/[// [^/]+/] )|(?:(?:href | src)= "" {0,1} [^/s |^"" |^> |^']*upload //([^/s |^>]+)["" |> |/s/']) "
setMatches = objregexp.execute( "[img] 2312.jpg [/img] [img] 2312.jpg [/img] hh [img] http:// ww w.dc9.cn/cm/upload/2ed312.jpg [/img] P://www.dc9.cn/dccdd.jpg ""> [img_right = 400,300、title] upload/2assas.jpg [/img_right] <s ceptsrc = "" http://www.dc9.cn/upload/sss.jpg "" src = http://www.dc9.cn/upload/sss.jpg '> ")
dimtmpmatch
fori = 0tomatches.count-1
callinsertdatatoarray(matches(i).submatches(0)、arymatch)