vb6 - split string become custom code in crystall report -
i have string this
p-123c automatic p-h342 non automatic system p-hh231 automatic system pd 4357jp ref-b130mk3 air system bsc-wdb801 flow system
and want string this
p-123c p-h342 p-hh231 pd 4357jp ref-b139mk3 bsc-wdb801
please help...master
i have tried, unfortunately pd 4357jp make problem because separate space. because result seem compose upper chars , digit only, i've try remove lower chars, result seem good:
dim sout string dim sin string dim sresult string dim long dim c string sin = "p-123c automatic p-h342 non automatic system p-hh231 automatic system pd 4357jp ref-b130mk3 air system bsc-wdb801 flow system" = 1 len(sin) c = mid$(sin, i, 1) select case asc(c) case 97 122 ' remove lower chars ' nothing case else sout = sout & c sout = replace$(sout, " ", " ") end select next sresult = sout debug.print sresult 'is: p-123c p-h342 p-hh231 pd 4357jp ref-b130mk3 bsc-wdb801
Comments
Post a Comment