欢迎来到Doc100.Net免费学习资源知识分享平台!
您的位置:首页 > 程序异常 >

请大伙儿帮忙看看,为什么这段代码有的能替换有的不能替换

更新时间: 2014-01-05 01:50:30 责任编辑: Author_N1

 

请大家帮忙看看,为什么这段代码有的能替换有的不能替换
		Dim m_playurl,mcj,mcj1,mcj2,mcj3,mcj4,mcj5,mcj6,mcj7,mcj8
m_playurl="^var govspx19613=""Fi7.imgs.letv.com%"";var n35754=""Bbdhd%3A%"";var pp_play=""DVD%E7%89%88%67876365edczd""+2+""B%""+2+""Bhttp%3A%""+2+""F%""+2+govspx19613+2+'6722027pargu'+2+""FswfPlayer.swf%3FautoPlay%3D1%20856457fkluy""+2+""6id%3D19""+2+""873944308ejueb""""+2+'55874932icwhx'+2+""""4%""+2+""4%""+2+'26169293estac'+2+""B%""+2+n35754+2+""F%""+2+""F""+2+""9985609%7CEB961064E957D941D3E65A11587F44413067367tocpc""+2+""%7C%E8%B8%AE%E8%B5%B7%E8%84%9A%E5%B0%96+%E5%BE%AE%E7%94%B5%E5%BD%B1.flv""+2+"""";pp_play=pp_play.replace(""67876365edczd"","""").replace(""6722027pargu"",""Fplayer%"").replace('20856457fkluy','').replace(""73944308ejueb"","""").replace(""55874932icwhx"",""31%"").replace(""26169293estac"",""4DVD%E7%89%88%"").replace(""13067367tocpc"","""");pp_play=pp_play.substring(0,pp_play.length-1);"
mcj=extract(m_playurl,"^","var pp_play")
mcj5=extract(m_playurl,";pp_play=pp_play",";")
mcj4=extract(m_playurl,"var pp_play=",";")
  if mcj<>"" then
  mcj = split(mcj,";")
  for i = 0 to Ubound(mcj) 
if trim(mcj(i))<>"" then
mcj1=split(replace(mcj(i),"var ",""),"=")
mcj2=mcj1(0)
mcj3=mcj1(1)
mcj4 = replace(mcj4,mcj2,mcj3)
end if
  next
  end if
  if mcj5<>"" then
  mcj8=mcj4
  mcj5 = split(mcj5,".replace")
  for j = 0 to Ubound(mcj5) 
if trim(mcj5(j))<>"" then
mcj6=extract(mcj5(j),"(",",")
mcj6=replace(replace(mcj6,chr(34),""),"'","")
mcj7=extract(mcj5(j),","&chr(34),chr(34)&")")
mcj4 = replace(mcj8,mcj6,mcj7)
end if
  next   
  end if
  Response.write mcj4
function extract(from,s_start,s_end)'取指定字符中间的字符
dim pos_start,pos_end,rtn
rtn="" 
pos_start=instr(from,s_start)
if pos_start>0 then
pos_start=pos_start+len(s_start)
pos_end=instr(pos_start,from,s_end)
if pos_end > pos_start then
rtn=mid(from,pos_start,pos_end-pos_start)
end if
end if
extract=rtn
end function


上面的代码只能替换成这样的:
"DVD%E7%89%88%67876365edczd"+2+"B%"+2+"Bhttp%3A%"+2+"F%"+2+"Fi7.imgs.letv.com%"+2+'6722027pargu'+2+"FswfPlayer.swf%3FautoPlay%3D1%20856457fkluy"+2+"6id%3D19"+2+"873944308ejueb""+2+'55874932icwhx'+2+""4%"+2+"4%"+2+'26169293estac'+2+"B%"+2+"Bbdhd%3A%"+2+"F%"+2+"F"+2+"9985609%7CEB961064E957D941D3E65A11587F444"+2+"%7C%E8%B8%AE%E8%B5%B7%E8%84%9A%E5%B0%96+%E5%BE%AE%E7%94%B5%E5%BD%B1.flv"+2+"" 			
			
		
上一篇:上一篇
下一篇:下一篇

 

随机推荐程序问答结果

 

 

如对文章有任何疑问请提交到问题反馈,或者您对内容不满意,请您反馈给我们DOC100.NET论坛发贴求解。
DOC100.NET资源网,机器学习分类整理更新日期::2014-01-05 01:50:30
如需转载,请注明文章出处和来源网址:http://www.doc100.net/bugs/t/1873/
本文WWW.DOC100.NET DOC100.NET版权所有。