Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String...

Status
Not open for further replies.

Sot

Programmer
Joined
Oct 10, 2002
Messages
24
Location
US
I have input string
Input val=195.4,280.0,,,301.3,,,441.9,

In that i need to elemnate the empty"" values...

Expected output is:195.4,280.0,301.3,441.9,


Sot
 
which part of the process are you having problems with?

_____________________________________________________________________
onpnt2.gif

[bdaycandle]
 
myVal = "195.4,280.0,,,301.3,,,441.9,"

myArr = split(myVal,",")
for x = 0 to uBound(myArr)
if isNUmeric(myArr(x)) then
outStr = "," & myArr(x)
end if
next

outStr = mid(outStr,2) 'take off first comma'


Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook
 
Dear mwolf00

I am getting only last value....

Sot
 
DOH!!! Sorry


myVal = "195.4,280.0,,,301.3,,,441.9,"

myArr = split(myVal,",")
for x = 0 to uBound(myArr)
if isNUmeric(myArr(x)) then
outStr = outStr & "," & myArr(x)
end if
next

outStr = mid(outStr,2) 'take off first comma'




Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook
 
Dear mwolf00

I am getting Answer Now...Thanks for your help...
Good solution..
Sot

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top