"===================================================================================================================
'Funktionsname: AustauschaveremoteFile
'Funktion: Remote -Bilder ersetzen und speichern
'Argumente: Const --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'Parameter: Savetf ------ Ob die Datei speichern, false speichert nicht, wahr speichern
'Parameter: Tisturl -------- aktuelle Webadresse
"===================================================================================================================
FunktionReplaceSaveremoteFile (Const, Strinstalldir, StrChanneldir, Savetf, Tisturl)
Ifconstr = "$ false $" orconstr = "" orstrchanneldir = "" Dann
ErsetzteremoteFile = Const
Ausgangsfunktion
Endif
Dimtempstr, tempstr2, tempstr3, re, Matches, Match, Temppi, Temparray, Temparray2
Setre = newRegexp
Re.Innorecase = true
Re.global = true
Re.Pattern = "<img.+? [^/>]>"
SetMatches = re.execute (Const)
ForeachMatchInmatches
Iftempstr <> "" dann
Tempstr = tempstr & "$ array $" & match.value
Anders
Tempstr = match.Value
Endif
Nächste
Iftempstr <> "" dann
Temparray = split (tempstr, "$ array $")
Tempstr = ""
Fortempi = 0Toubund (Temparray)
Re.pattern = "src/s*=/s*.+?/. (Gif | jpg | bmp | jpeg | psd | png | svg | dxf | wmf | tiff)"
SetMatches = re.execute (temparray (tempi))
ForeachMatchInmatches
Iftempstr <> "" dann
Tempstr = tempstr & "$ array $" & match.value
Anders
Tempstr = match.Value
Endif
Nächste
Nächste
Endif
Iftempstr <> "" dann