Subrutin berikut pada dasarnya dapat dianggap sebagai kecocokan umum yang relatif baik. (PS: Tiba -tiba saya menemukan bahwa Code_lite lolos dari UBB saya !!! Saya sangat pusing sehingga saya harus melarikan diri ...)
Dimobjregexp, cocok, 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] <href =" haTpon: "ht2ed312. jpg ""> </a> href = "" http://www.dc9.cn/dccdd.jpg ""> [img_right = 400,300, judul] unggah/2assas.jpg [/img_right] <ceptsrc = "" http:/poad.
DIMTMPMATCH
Fori = 0tomatches.count-1
CallInsertDatoArray (Matches (I) .Submatches (0), Arymatch)
CallInsertDatoArray (Matches (I) .submatches (1), arymatch)
Berikutnya
Fori = 0toubound (arymatch)
IFNOTISNULL (ARYMATCH (I)) dan TRIM (ARYMATCH (I)) <> "" ThenResponse.WriteAryMatch (I) & "<br>"
Berikutnya
FunctionInSertDatoArray (Data, Byrefarymatch)
Iftrim (data) <> "" Lalu
Data = ganti (data, "'", "")
Data = ganti (data, "" "", "")
Data = ganti (data, "/", "/")
Data = split (data, "/") (ubound (split (data, "/")))
RedimpreservearyMatch (ubound (arymatch) +1)
Dc9_dot_cn_match = false
Forj = 0toubound (arymatch)
Ifarymatch (j) = datathendc9_dot_cn_match = true
Berikutnya
IFNOTDC9_DOT_CN_MATCHTENARYMATCH (ubound (arymatch)) = data
Endif
Fungsi endfungsi
Faktanya, jika Z-Blog digunakan, itu cukup untuk mencocokkan unggahan (tetapi untuk menghemat masalah dan lebih tepatnya, saya cukup menambahkan unggahan ke pertandingan di atas, jadi tampaknya yang berikut ini lebih rumit. Faktanya, secara teoritis, yang berikut ini harus lebih sederhana, setelah semua, ada unggahan untuk mengontrol ...). Anda tidak perlu split/. untuk menulisnya seperti ini:
DimoBjregexp, cocok, i, zc_upload_match
Dimarymatch ()
RedimpreservearyMatch (0)
Setobjregexp = newregexp
objregexp.ignorecase = true
objregexp.global = true
objregexp.pattern = "(?:/[[^/]]+/] [^/[]*unggah // ([^/[|^// |^//]+)/[// [^/]+/] ) | (? :(?: href | src) = "" {0,1} [^/s |^"" |^> |^']*unggah // ([^/s |^>]+) ["" |> |/s/'] ")"
SetMatches = objregexp.execute ("[img] 2312.jpg [/img] [img] 2312.jpg [/img] hh [img] http: // ww w.dc9.cn/cm/upload/2Ed312.jpguarkan/img media<ahref= "" htt: //www.dc9.cn/ddd.jpg ""> </a> href = "" htt p: //www.dc9.cn/dccdd.jpg ""> [img_right = 400.300, judul] Unggah/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
CallInsertDatoArray (Matches (I) .Submatches (0), Arymatch)