definitely it should work as expected.. The reason for not working may be due leading/trialing spaces.
Can you give us more information like where do you fetch the data for
ws-var. Is it read form file? sa this piece os code u provided is flawless.
this is ashutosh. the answer to ur query is that its working perfectly fine at my end, not numeric clause checks whether the variable is numeric or not and will result to true when the variable is not numeric. check it again and if there's any prob kindly let me know