captainquigers
Programmer
How would I go about removing unwanted spaces from a text string and all text to the right of this?
e.g.
"xx1 pl5605" -----> xx1
"g8 jj77" -----> g8
I've tried various combinations of trim and clean but can't get them to work.
Please note that there can be any number of spaces but I want to remove everything to the right of the first space that occurs.
Cheers,
Paul.
e.g.
"xx1 pl5605" -----> xx1
"g8 jj77" -----> g8
I've tried various combinations of trim and clean but can't get them to work.
Please note that there can be any number of spaces but I want to remove everything to the right of the first space that occurs.
Cheers,
Paul.