trim not working

Am I missing anything.

You seem to have forgotten to include your code with your post. Posting one line of code is not enough to give definitive advice.

At a guess, sRX is a String and you expect sRX.trim(); to remove spaces within it, whereas the trim() function only removes leading and trailing spaces.