Function Test(patrn,str,replStr)
Set regEx = New RegExp
regEx.Pattern = patrn
regEx.IgnoreCase = true
if regEx.test(str) then Test = regEx.Replace(str,replStr)
set regEx=nothing
End Function
Function Test(patrn,str,replStr)
Set regEx = New RegExp
regEx.Pattern = patrn
regEx.IgnoreCase = true
Test = regEx.Replace(str,replStr)
set regEx=nothing
End Function
str="CCCC[upload=XXX].......[/upload]CCCC"
str_arry=split(str,"[/upload]")
qustr=""
for i=0 to ubound(str_arry)
if instr(str_arry(i),"[upload=")<>0 then
qustr=qustr&mid(str_arry(i),instr(str_arry(i),"[upload=")+4)&"||"
end if
next
reponse.write(qustr)