Hi
I have a variable called EmpName = “Srinivasa (125122)”
I want take only number part 125122 in the variable and put into new variable called EmpId.
Can any one help please!!
Thanks
Srini
Hi
I have a variable called EmpName = “Srinivasa (125122)”
I want take only number part 125122 in the variable and put into new variable called EmpId.
Can any one help please!!
Thanks
Srini
resultString = Regex.Match(EmpName, "\d+").ToString
Parse into Integer if required.
Thank you so much KathikByggari !!
I have copy pasted whatever you have given.

I am getting validation error.
I am new to UiPath. Could you please explain bit more?
Thanks
Please let me know what is the error message?
Place mouse at the Exclamation mark (!) and send me the error screenshot.
Here is :

Remove @ from the expression.
If still error is there, in the expression write like this "\\d+"
There is another way doing this with a String-Split - although I would agree with @KarthikByggari that RegEx is the better solution!
For the split you can use this code assigned to a string variable:
EmpID = EmpName.Split("(".ToCharArray).Last.ToString.Replace(")",String.Empty)
No luck KarthikByggari !!

But other solution is working which is given by FrankSchikora
It is working fine FrankSchilora !!
Thanks a lot !! ![]()
Regex.Match(strEmp,"\d+").ToString
.Value in the expression is in C#. I am a bit confused.