parse string

hi there; i'd like to parse the following:

dim strTemp = "ib01h"

and retrieve just "01"

so, basically, i just need everything between the 2nd character and the "h"

thanks all.
LVL 1
vbnewbie01Asked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
some tutorials:

string functions in c#:
http://www.peachpit.com/articles/article.asp?p=31938&seqNum=13

string functions in vbscript:
http://www.w3schools.com/vbscript/vbscript_ref_functions.asp#string

Better learn how to do.
0
 
Sam_JayanderCommented:
Hi,

use,
   yourString.Substring(2,yourString.IndexOf("h")-2);

here 2 is the startindex. (Hope "h" will be a fixed.)

Regards,
--Sam.
0
 
vbnewbie01Author Commented:
thats what i was looking for ... thanks.

Mid(strTemp, 3, 2)
0
 
vbnewbie01Author Commented:
hi, sam, thanks for your response ... actually, the "h" was just a reference to illustrate the cutoff... sorry to confuse you ... but, thanks again.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.