-
'ชื่อฟังก์ชั่น: replacesaveremotefile
'ฟังก์ชั่น: แทนที่และบันทึกรูปภาพระยะไกล
'ข้อโต้แย้ง: ข้อ จำกัด ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'พารามิเตอร์: savetf ------ ไม่ว่าจะบันทึกไฟล์เท็จไม่บันทึกจริงบันทึก
'พารามิเตอร์: tisturl -------- ที่อยู่เว็บปัจจุบัน
-
FunctionReplacesaveremoteFile (cronst, strinstalldir, strchanneldir, savetf, tisturl)
ifconstr = "$ false $" orconstr = "" orstrchanneldir = "" แล้ว
แทนที่
exitfunction
endif
DimtempStr, TempSTR2, TempSTR3, RE, Matches, Match, Temppi, Temparray, Temparray2
setre = newregexp
re.ignorecase = true
re.global = true
re.pattern = "<img.+? [^/>]>"
setMatches = re.execute (ข้อ จำกัด )
foreachMatchinMatches
iftempstr <> "" แล้ว
tempstr = tempstr & "$ array $" & match.value
อื่น
tempstr = match.value
endif
ต่อไป
iftempstr <> "" แล้ว
temparray = split (tempstr, "$ array $")
tempstr = ""
fortempi = 0toubound (Temparray)
re.pattern = "src/s*=/s*.+?/. (gif | jpg | bmp | jpeg | psd | png | svg | dxf | wmf | tiff)"
setMatches = re.execute (temparray (tempi))
foreachMatchinMatches
iftempstr <> "" แล้ว
tempstr = tempstr & "$ array $" & match.value
อื่น
tempstr = match.value
endif
ต่อไป
ต่อไป
endif
iftempstr <> "" แล้ว