Link to home
Start Free TrialLog in
Avatar of vbnewbie01
vbnewbie01

asked on

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.
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sam_Jayander
Sam_Jayander

Hi,

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

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

Regards,
--Sam.
Avatar of vbnewbie01

ASKER

thats what i was looking for ... thanks.

Mid(strTemp, 3, 2)
hi, sam, thanks for your response ... actually, the "h" was just a reference to illustrate the cutoff... sorry to confuse you ... but, thanks again.