String contains a number?


Hey, How to check if a String contains a number?


Hi @UiMe,

you can check with regex as the following,

Regex.Match(yourInputString, “\d+(?:[.,]\d+)*”)


You can find using the below condition.
it gives true if it contains any number otherwise false.
“Your String”.Any( function(x) char.IsDigit(x))

if you want to know what is the number in your string try the below condition.

String.Join(vblf,(From item In “Your String”.ToString
Where IsNumeric(item)
Select item))


Hi @sarathi125,

Thanks. If I have something like this as String:
Moh, Ahm / 02.08.18 12:11

How can I get (02.08.18) which is actually a date and save it in variable?