How to split value

Hi Everyone,

I Haeve this type of value (COUNT(1) 2987) just like this.
So, I wanted only interger value i.e. 2987 from this value with out any space.

one of many options:
grafik

Cint(System.Text.RegularExpressions.Regex.Match(YourStringVar,"\d{2,}").Value)
1 Like

Use RegEx

(?<=COUNT\(1\) ).*(?=\))

If the 1 could be any number then switch it to:

(?<=COUNT\([0-9]\) ).*(?=\))

System.Text.RegularExpressions.RegEx.Match(yourStringVar,"(?<=COUNT\([0-9]\) ).*(?=\))")

Hi @itbuddy1

Try this:

stringvar= "COUNT(1) 2987"
output= System.Text.RegularExpressions.Regex.Match(stringvar,"(?<=\s)\d+").Value)


or

stringvar= "COUNT(1) 2987"
SplitOutput= stringvar.Split(" ")(1)

Hope it helps!!