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


Please Help Members By Posting Answers For Below Questions

regular expression that will recognize a browser as long as its name property starts with mybrowser

2286


What is the use of the formatdatetime function in the vbscript language?

1078


Explain the constants in vbscript?

1044


Explain about scrrun.dll in vbscript?

1138


How to take whole text output from screen of Bitmap Application.

2437


Mention how you can call vbscript functions?

1193


How can constants be declared in the vbscript language?

1063


Mention what are the rules to name variable in vbscript?

1075


how to answer "TELL ME ABOUT UR SELF" as exp.person. whr to start and whr to stop. can anyone tel me

1893


What is variant in vb script?

1204


What are the valid scopes of a variable in vbscript?

1153


how to increasing the numbers in a given text box please write a vb script

2262


How to Import data from a file (file is on the desktop) to the data table

2051


what is resorceallocation

2277


when we use filter funtiom invb script(QTP)

2840