3 Replies Latest reply: Oct 25, 2012 12:48 PM by Sandeep Teotia RSS

    Easy way to check if a certain character is a number?

      Hi!

      Is there an easy way to check if a certain character is a number?
      Right now I am using ..
      PurgeChar(str, '0123456789') as test

      This works but removes all numbers from the string. What I am after isa way to check if the second character
      is a number. Depending on if it's true or not, only use the first letter otherwise the complete string.

      I've also tried this (no success)...
      if(NumCount(str)<1, str, Left(str,1)) as test

      Thanks