如比一个STRING : 请说出以下的一些数字 586854654我就要取这个 586854654 ,数字是不固定的,位置也不固定
解决方案 »
- 谁能帮我做个VB程序设计的画图程序 要鼠标拖动了画的可以画个笑脸出来 代码和控件发给我下 谢谢了
- vb中如何将一些过期不用的数据移动到另张表
- 各位大人:如何调用一个存储过程!
- 初学水晶报表问题:登陆失败了:(
- 如何对listview控件的显示项进行修改?
- HELP!在VB中设置共享目录的API谁知道?并且会用?!请指教!在线等待您的回答!
- 邮件发送,高分求解
- 循环一百次,我只想在循环到95次以后做调试,请问如何设置点?
- 请问在ADO中如何更新,也就是达到控件中Refresh方法的效果。
- 问你个问题,MEDIAPLAYER播放VCD是默认为左声道,解霸默认为立体声,如果在编程中使MEDIAPLAYER播放为立体声
- 达人帮忙~Winsock(高分马上奉送)
- 关于调用KMplayer的问题!
dim thestring as string
thestring="请说出以下的一些数字 586854654"
dim digits as string
digits=""
dim i as long
for i=0 to len(thestring)
if isnumeric(mid$(thestring,i,1)) then
digits=digits & mid$(thestring,i,1)
else
if len(digits)<>0 then
'截获了一个数字
Me.Print digits
digits=""
end if
end if
next
Private Sub Form_Load()
Dim thestring As String
thestring = "请说出以下的一些数字 586854654"
Dim digits As String
digits = ""
Dim i As Long
For i = 1 To Len(thestring)
If IsNumeric(Mid$(thestring, i, 1)) Then
digits = digits & Mid$(thestring, i, 1)
Else
ProcDigits digits
End If
Next
ProcDigits digits
End SubPrivate Sub ProcDigits(ByRef digits)
If Len(digits) <> 0 Then
'截获了一个数字
Debug.Print digits
digits = ""
End If
End Sub