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
Hi Friends, I have an issue like the describe below: I'm using QTP and I'm testing on SharePoint. As you knoe, SharePoint has a customize function for user, so that, If I add an object Web Table at the first time, that object was recognized by "index" and "html tag", after that, if someone change the display of web part, the "Index" of my object was changed as well and QTP unable to select that Web Table. Can you guide me how to identify or anyway to keep that Web Table object as unique object? Thanks a lot.
Plzzzzzzz can any one tell me which is the best institute in hyderabad for learing VBScript. plz do answer guys its urgent plzzzzzzz. thanks in advance.
How are values assigned to string type and numeric type variables?
What is the difference between vb debugger and the script debugger?
Which operator can be used to do an xor operation in vbscript?
Which operator is used to concatenate the 2 values in the vbscript language?
Explain the string concatenation function in vbscript?
For a webbased application:- what should be code in expert veiw, for retrieving a single column name "username" from a server and checking whether exported "username" from datatable doesn't exist in server. suppose i have saved in excelsheet a username="gayatri" , which is exported, then checked for whether this username "gayatri" exist in server database or not ? if exist then allow to enter new username, which should be again checked for in loop , or else come out of loop and enter a distinct "username". plz let me have this answer in my id gayatrisahooin@hotmail.com
Mention the rules for using option explicit statement?
Which function is used in the vbscript language to convert the specified expression into a date type value?
Which object provide information about a single runtime error in a vbscript?
What is Procedure or Subroutine in VB Script?
Please let me Know regarding any material regarding VB Scripting which should be easily understandable for Beginners.
How to open excel in vb script?
There are 5 web pages.write a script to click the button on 4th web page.