'==========================================================================
'関数名:ResavereMoteFile
'関数:ファイルの保存を見つけて交換します
'引数:str ----元の文字列
'パラメーター:URL ---もちろんWebサイトURL
'パラメーター:dir ----ディレクトリを保存します
'パラメーター:Insave --------保存、真、False
'戻り値:フォーマットされた文字列
'==========================================================================
publicFunctionResavereMoteFile(byvalstr、byvalurl、byvaldir、insave)
dims_content
薄暗い
dimcontentfile、contentfileurl
dimstrtempurl、strfileurl、dirtemp、pathtemp、filetemp、temp、tempurlarray、arr_path
dimsallowextName
sallowextname = "rm | swf"
s_content = str
onerrorresumenext
setre = newRegexp
re.ignorecase = true
re.global = true
re.pattern = "((src = | href =)((/s)+[。] {1}("&sallowextname& "))"
setContentFile = re.execute(s_content)
dimscontenturl()、n、i、brepeat
n = 0
foreachcontentfileurlincontentfile
strfileurl = cheplage(置き換え(置換(置き換え(contentfileurl.value、 "" src = "、"、 "、1、-1,1)、" href = "、"、 "、1、-1,1)、" '"、")、chr(34)、 "")
ifn = 0then
n = n+1
redimscontenturl(n)
scontenturl(n)= strfileurl