Hi all,
Can anyone help me please,
How to test if a string starts with number or not.
Ex:
My String is “12345C56G454” – this Strats with number 1
“C434243242R5” – This doesn’t starts with number
Thanks in advance.
Hi all,
Can anyone help me please,
How to test if a string starts with number or not.
Ex:
My String is “12345C56G454” – this Strats with number 1
“C434243242R5” – This doesn’t starts with number
Thanks in advance.
Hey
You can use this one
Isnumeric(strVar.substring(0))
Thanks
thank and
sorry my question is I need to check whether my string is numeric or not numeric.
How can is achieve this
IF( variblename.is numeric or variable name is not numeric)
How can i write for not numeric condition
Thanks
Hey!
Try this…
Create a Boolean variable…
Assign boolVar = System.Text.RegularExpressions.regex.IsMatch(YourString,"[0-9]")
This will give you the Boolean value…
You can use this is in if condition…
boolVar=true
In then block you can do whatever you want…
OR
You can use
isNumeric(string variable)
Regards,
NaNi
Then
You can directly wtite
Keep in if else activity
Isnumeric(strVar)
Thanks
Thanks Nani,
If(( numeric or not numeric)) and variable starts with numeric)
this is my requirement
Thanks
Hey,
Yes the above expression will give you the boolvalue…
In then block the numeric operation will executes…
In else block the alphabet operation will executes
Reference:
Regards,
NaNi
Hello @saritha
Are you checking whether the string starting with a numeric or alphabet or the entire string is numeric or not? pLease clarfy.
If you want to check the string starts with Numeric, you can use startsWith Method. : Isnumeric(InputVariable.substring(0))
InputVariable is the varibale holding the value.
If entire string to be checked, then do as : _booleanResult = isNumeric(_input)
No, I’m looking for string starts with numeric or not
Thanks it worked. can u please explain it for me to understand.
You can use the below expression. It will give you a boolean result. Then you can use an if condition.
Isnumeric(InputVariable.substring(0))
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.