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
regular expression that will recognize a browser as long as its name property starts with mybrowser
What is the use of the formatdatetime function in the vbscript language?
Explain the constants in vbscript?
Explain about scrrun.dll in vbscript?
How to take whole text output from screen of Bitmap Application.
Mention how you can call vbscript functions?
How can constants be declared in the vbscript language?
Mention what are the rules to name variable in vbscript?
how to answer "TELL ME ABOUT UR SELF" as exp.person. whr to start and whr to stop. can anyone tel me
What is variant in vb script?
What are the valid scopes of a variable in vbscript?
how to increasing the numbers in a given text box please write a vb script
How to Import data from a file (file is on the desktop) to the data table
what is resorceallocation
when we use filter funtiom invb script(QTP)