andieje
asked on
string maniupationg question
Hi
I have some strings that look like this
. 1/10 .
. 2/45 .
this is: space, full stop, space, one or more numbers , forward slash, one or more numbers, space, fullstop, space
what i need to do is extract the bit in the middle (one or more numbers , forward slash, one or more numbers)
e.g 1/10, 2/45
and then if the first number happens to be 0, convert it to 1
e.g. 0/10 --> 1,10
how would i do this?
thanks
andrea
I have some strings that look like this
. 1/10 .
. 2/45 .
this is: space, full stop, space, one or more numbers , forward slash, one or more numbers, space, fullstop, space
what i need to do is extract the bit in the middle (one or more numbers , forward slash, one or more numbers)
e.g 1/10, 2/45
and then if the first number happens to be 0, convert it to 1
e.g. 0/10 --> 1,10
how would i do this?
thanks
andrea
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
dim a() as string=mystring.split("/")
for i as integer=0 to a.getupperbound(0)
dim finalvalue as string=""
finalvalue=iif(int(a(i))=0
msgbox(finalvalue)
next