请问一他字符串截取的问题?

dreamboku 2005-03-26 10:13:47
http://seek.3721.com/left.htm?fw=cm2&name=%CC%EC%BD%F2%BC%D2%BD%CC&ff=0

就是从这串网址中用ASP实现取出"%CC%EC%BD%F2%BC%D2%BD%CC"就是从name=到ff=0之间的这段,该如何实现呀!
...全文
77 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
yiyioo 2005-03-26
  • 打赏
  • 举报
回复
或者这个
Instr()

函数返回字符或字符串在另一个字符串中第一次出现的位置.

表达式 Instr([start, ] strToBeSearched, strSearchFor [, compare])

允许数据类型: Start为搜索的起始值,strToBeSearched接受搜索的字符串 strSearchFor要搜索的字符.compare比较方式(详细见ASP常数)

实例: <%

strText = "This is a test!!"

pos = Instr(strText, "a")

response.write pos

%>

返回结果: 9
yiyioo 2005-03-26
  • 打赏
  • 举报
回复
如果不定长
用InStrRev再结合right或者left
InstrRev()

函数同上,只是从字符串的最后一个搜索起

表达式 InstrRev([start, ] strToBeSearched, strSearchFor [, compare])

允许数据类型: 同上.

实例: <%

strText = "This is a test!!"

pos = InstrRev(strText, "s")

response.write pos

%>

返回结果: 13
yiyioo 2005-03-26
  • 打赏
  • 举报
回复
如果定长的话

Mid()

函数返回特定长度的字符串(从start开始,长度为length).

表达式 Mid(string, start [, length])

实例: <%

strTest = "This is a test! Today is Monday."

response.write Mid(strTest, 17, 5)

%>

返回结果: Today
dreamboku 2005-03-26
  • 打赏
  • 举报
回复
我是说字符串截取。
hbhbhbhbhb1021 2005-03-26
  • 打赏
  • 举报
回复
dim a
a=request("name")
response.write a

28,405

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧