Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / abhijit bongale

Option Explicit

Dim Str : Str = "capgemini12345june2013"
Dim i, j

For i = 1 to Len(Str)
If Asc(Mid(Str, i, 1)) >= 48 AND Asc(Mid
(Str, i, 1)) <= 57 Then
Exit For
End If
Next

MsgBox i

For j = i to Len(Str)
If (Asc(Mid(Str, j, 1)) >= 65 AND Asc(Mid
(Str, j, 1)) <= 90) OR (Asc(Mid(Str, j, 1)) >= 97 AND Asc
(Mid(Str, j, 1)) <= 122) Then
Exit For
End If
Next

MsgBox j

MsgBox Mid(Str, i, (j - i))

Set Str = Nothing

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which object provide information about a single runtime error in a vbscript?

1037


How will you get the octal value of the given number in vbscript?

936


Mention what is vbscript?

1073


Is vbscript a case-sensitive or case-insensitive?

1227


Out of the different type of operators, which are evaluated first and last in the vbscript language?

967


can anyone send me a vb scripts code for clicking on a link and coming back on home page again does the same for many links on a web page.

2268


give me any information abou vb script books learn quckly

2131


Why is the use of exit do or exit for statements within loops discouraged?

998


How should i Create Email invite with server-side Coding?

2086


Explain the tristate constants in vbscript?

991


Explain some uses of vb script?

929


How to create a function in vbscript?

1170


Explain about vb script?

1186


What is difference between vbscript and vba?

1159


Hi this is Vinoth. I need a help on below mentioned question A combobox contains list of items assume as 5 I have to get each items Individually and I have to Export to datatable. Please help me on this. Thanks

2106