'==========================================================================
'Имя функции: заменяет averemotefile
'Функция: заменить и сохранить удаленные изображения
'Аргументы: создать --------------------------------------------------------------------------------------------------------------------------------------
'Параметры: savetf ------: Сохранить файл, false не сохраняет, истинно сохранить
'Параметры: Tisturl -------- Текущий веб-адрес
'==========================================================================
FunctionReplacesAvereMotefile (Constry, Strinstalldir, Strchanneldir, Savetf, Tisturl)
Ifconstr = "$ false $" orconstr = "" orstrchanneldir = "" then
Заменяет avereMotefile = constr
Выходная функция
Эндиф
Dimtempstr, Tempstr2, Tempstr3, Re, Matches, Match, Temppi, Temparray, Temparray2
Setre = newRegexp
Re.ignorecase = true
Re.global = true
Re.pattern = "<img.+? [^/>]>"
Setmatches = re.execute (constry)
Foreachmatchinmatches
Iftempstr <> "" Тогда
Tempstr = tempstr & "$ array $" & match.value
Еще
Tempstr = match.value
Эндиф
Следующий
Iftempstr <> "" Тогда
Temparray = split (tempstr, "$ ray $")
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
Эндиф
Следующий
Следующий
Эндиф
Iftempstr <> "" Тогда