'=========================================================================
'Nombre de la función: reemplazarveremoteFile
'Función: reemplazar y guardar imágenes remotas
'Argumentos: Construcción ------------------------------------------------------------------------------------------------------------------
'Parámetros: saveTf ------ Si para guardar el archivo, falso no se guarda, verdadero guardar
'Parámetros: Tisturl -------- Dirección web actual
'=========================================================================
FunctionRePlacesSaveremoteFile (Constr, StrinStallDir, Strchanneldir, Savetf, Tisturl)
Ifconstr = "$ false $" orconstr = "" orstrchanneldir = "" entonces
ReemplazarveremoteFile = constructor
Extinción
Endif
DimTempstr, Temptr2, Temptr3, RE, Matches, Match, Tempppi, TempArray, TempArray2
Setre = newregexp
Re.ignorecase = True
Re.global = verdadero
Re.pattern = "<img.+? [^/>]>"
SetMatches = re.execute (construcción)
Foreachmatchinmatches
Iftempstr <> "" entonces
Tempttr = temptrtr & "$ array $" & match.Value
Demás
Tempttr = match.Value
Endif
Próximo
Iftempstr <> "" entonces
TempArray = Split (TemptRTR, "$ Array $")
Tempttr = ""
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 <> "" entonces
Tempttr = temptrtr & "$ array $" & match.Value
Demás
Tempttr = match.Value
Endif
Próximo
Próximo
Endif
Iftempstr <> "" entonces