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 many types of procedures are available in the vbscript language?
Write a test case using Test if the images,a particular test exists,check if the page links match,page response is within a certain range,parameterization of the test,the test should comprise of actions,the test should use a custom function,the test should use global repository
Explain about arrays in vb script?
How are values assigned to the variables in the vbscript language?
What are the properties of regexp object?
What is the output of a + b in vbscript if a = 5 and b = 10?
how to increase the values in text box in a given text box increament by two values by clicking on button
Program to use input box and send even numbers into sheet1 and odd numbers into sheet2 and prime numbers into sheet3 using vbscript(QTP)?
What is the difference between a dictionary and an array?
Is VB Script Case sensitive or Case insensitive?
When to use function procedures and what are its characteristics?
create a form to accept username and password validate the username and password with using message box, display the corresponding user message
How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.
If a calulator having 3 buttons (of any number)in 3 of them one is not working properly due to which answer is wrong always. write a script to find out which button is not working properly ?
What are the naming conventions while declaring a variable in the vbscript language?