if there is any string in a given format like as "company
name employeecode date" then we have to fetch employeecode
form string
for ex-string is "capgemini12345june2013" then we have to
fetch 12345 by using vb script so guys how can we do that
please reply it.
Answer Posted / suman
Str = "capgemini12345une2013"
Dim i, j
For i = 1 to Len(Str)
If isnumeric(Mid(Str, i, 1)) Then
Exit For
End If
Next
MsgBox i
For j = i to Len(Str)
If not isnumeric(Mid(Str, j, 1)) Then
Exit For
End If
Next
MsgBox j
MsgBox Mid(Str, i, (j - i))
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
while using Keyward driven framework in QTPif new requirements are added how to manage it...plz ans
I am working on QTP, got struck in one place.. In my application depending upon configuration WebEdit count is increasing/ decreasing.. how to get these webedits..
what is diff between static and dynaic arrys?
How to Enter Values on the Command promt using VB script
Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?
Mention what are the rules to name variable in vbscript?
Explain some uses of vb script?
Which object is used to work with the database in the vbscript language and what statement is used to create this object?
Explain different types of segment?
Explain the extension .hta?
Which object is used to work with the excel sheets in the vbscript language and what statement is used to create this object?
i need to sort the data using qtp script for this how i need to write a qtp script
hi Set myobj=Description.Create() myobj("type").value="submit" myobj("name").value="google search" myobj("html tag").value="button" browser("title:=google").page("title:=google").webButton (myobj).Click i was running above code in one weak back it was working fine i got result,again i opened after few days ,again i was trying to run the code it shows run time error in last line of my code ,why ?pls answer my question?
What are the disadvantages of vbscript?
Compare java script and vb script?