Recommended: Brief analysis of ASP-server.URLEncode inverse function: urldecode If there are spaces, use instead. If there are other characters, use %ASCII instead. If there are four byte characters such as Chinese characters, use two %ASCII instead. However, sometimes we also need to decode the string that has been encoded, but asp does not provide relevant
| The following is the quoted content: 'Modified the pattern again 'code to detect 'http://www.CuoXIn.com/asp.asp 'leixing html or ubb 'nopic code has no image default value function toppic(code,leixing,nopic) set regex = new regexp regex.ignorecase = true regex.global = true if leixing = html then regex.pattern = <img(.*?)src/s?/=/s?(/u0022?)([^/u0022//>] ) else regex.pattern = /[img/]([^/u005B] ) end if set matches = regex.execute(code) if regex.test(code) then if leixing = html then toppic = matches(0).submatches(3) else toppic = matches(0).submatches(0) end if else toppic = nopic end if end function code1 = <img src=1.gif> pic = toppic(code1,html,nopic.gif) response.Write pic |
Share: ASP instance: Program that reads xml files The following is the referenced content: strSourceFile = Server.MapPath(dataXML&/Advertisement/&id&/adv.xml) Set