字符串处理问题!

xiaowangzi 2002-07-22 11:11:14
我现在有这样的一个字符串A B c (注意字符串是会变的。有时候 A B C D E F G。。。)
注意他们之间有一个空格。我如何来一个一个取出来
A B C。。。
明白吗?
...全文
35 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiaowangzi 2002-07-22
  • 打赏
  • 举报
回复
问题出现了,解决立即结帐
现在的问题是这样的字符串:Ahttp://10.10.0.201/movie/动作片/A.RM Bhttp://10.10.0.201/movie/动作片/B.RM Chttp://10.10.0.201/movie/动作片/C.RM
现在我想分别取出A B C 来然后把他们相应的连接也取出来!就是
A对应的是http://10.10.0.201/movie/动作片/A.RM
B对应的是http://10.10.0.201/movie/动作片/B.RM
C对应的是http://10.10.0.201/movie/动作片/C.RM
字符串Ahttp://10.10.0.201/movie/动作片/A.RM Bhttp://10.10.0.201/movie/动作片/B.RM http://10.10.0.201/movie/动作片/C.RM的规律是Ahttp://10.10.0.201/movie/动作片/A.RM和B之间有一个空格http://10.10.0.201/movie/动作片/B.RM和C之间有空格
明白吗?谢谢!
meizz 2002-07-22
  • 打赏
  • 举报
回复
gshope(gshope) 已经回答得相当好了。
gshope 2002-07-22
  • 打赏
  • 举报
回复
结帐吧:)
gshope 2002-07-22
  • 打赏
  • 举报
回复
结帐吧:)
xiaowangzi 2002-07-22
  • 打赏
  • 举报
回复
thk
gshope 2002-07-22
  • 打赏
  • 举报
回复
aa=split(abc," ")
for i=0 to ubound(aa)
response.write aa(i)
next
gshope 2002-07-22
  • 打赏
  • 举报
回复
aa=split(abc," ")
for i=0 to ubound(aa)
response.write aa(i)
next
lanying 2002-07-22
  • 打赏
  • 举报
回复
Function Split2(ByVal strMain,ByVal strSub)
Dim astrResult()
Dim intStartPos,intEndPos,intCount

intStartPos = 1
intEndPos = 1
intCount = 0

Do
intEndPos = InStr(intStartPos,strMain,strSub)
If intEndPos > 0 Then
Redim Preserve astrResult(intCount)
astrResult(intCount) = Mid(strMain,intStartPos,intEndPos - intStartPos)
intCount = intCount + 1
intStartPos = intEndPos + 1
End If
Loop While intEndPos > 0

Redim Preserve astrResult(intCount)
astrResult(intCount) = Mid(strMain,intStartPos)

Split2 = astrResult
End Function
xiaowangzi 2002-07-22
  • 打赏
  • 举报
回复
分数太少了,奏合用吧!
bestpeaker 2002-07-22
  • 打赏
  • 举报
回复
aa=split(abc," ")
for i=0 to ubound(aa)
response.write left(aa(i),1)
response.write mid(aa(i),2)
next

28,390

社区成员

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

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