【软件自动化测试 - VBScript 6】== Example of Split, Instr, Mid functions

str = "This a test for InStr split lbound ubound mid"
Dim a
a = split(str," ")
'msgbox lbound(a)
'msgbox ubound(a)

For i = lbound(a) to Ubound(a)
    msgbox(a(i))
next
'
rec = InStr(1,str,"recorded",1)
'msgbox rec

'Return for second space position
SpacePos = InStr(14,str," ",1)
msgbox SpacePos

'Return ur Transation Number
transno = mid(str,SpacePos,rec-SpacePos)
msgbox(transno)

你可能感兴趣的:(【软件自动化测试 - VBScript 6】== Example of Split, Instr, Mid functions)