Re: removing characters and spaces from a string?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



basically i will be reading in some kind text string in the format of:
CCC CCC or CCCC CCC where c is a number or letter.

I need to strip everything after the space, including the space so:

ABC 123 would become ABC, ABC2 123 would become ABC2.

any ideas how i'd go about this please?

While I would use the code Larry posted in a "real" program (it is faster),
for non-repetitive (that is, non-looping) code segments on short text
strings, I also use this

txt = "abc 123"
PartBeforeTheSpace = Split(txt)(0)

Rick


.



Relevant Pages