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
How to replace junk code recorded by QTP with a mall function.
What are class properties?
Which loop is used in case of arrays in the vbscript language?
How will you reverse a string in vbscript?
What is sql loader? Explain the files used by sql loader to load file?
Explain the arrays in vb script?
Write a function for Instr(). We need to write a function that works as same as Instr(). Code or Even pseudo code is good enough for me.?
What if you do not specify anything when you call a procedure?
give me any information abou vb script books learn quckly
Which keyword is used to declare a variable in the vbscript language?
what is inner join? what is outer join? what is a constraint? tell me about rdbms? tell me about acid properties?
Which respective symbols are used to separate a line and to break the lengthy statement into multiple statements in the vbscript language?
Hi Friends my Question is very simple,in Manual testing when we click on a hyper link it directs us to the relavent page or it re-directs us to the current page,so there we can easily write testcase but same thing if we do in automation script using QTP & need to generate report using Reporter.report event how we will do it?thanks in advance...
Mention what is vbscript?
How to access array data?