Get just number from string variable

Hello,
I have a string that contains numbers and words, I want to just get the number from that.
Input: 2 users
Output: 2
How would I do that?

Hi,

Can you try the following expression?

System.Text.RegularExpressions.Regex.Match(strData,"\d+").Value

Regards,

1 Like

use matches activity and pass your input and this as a pattern \d+
Cheers
As @Yoichi mentioned even that’s gonna workout for you!
cheers
@dvn