How to get only number from string in excel row

How to get only number from string in excel row .

Use Case Description

In excel row input data : Info 10 , info10 , info1 , 10 , 1 . I need to get the number only. I used some regex method while it includes str and integer it works but if only number in row i am getting empty string . i used ā€œ\dā€ still not working .

AS-IS WORKFLOW, TO-BE WORKFLOW

-

Other information about the use case

Industry categories for this use case: Customer Service, Finance, Healthcare Pharma, Information Technology and Services, Other Sector

Skill level required: Intermediate

UiPath Products that were used: UiPath Studio

Other applications that were used: -

Other resources: -

What is the top ROI driver for this use case?: Accelerate growth and operational efficiency

@jayanth_marc

Welcome back to our UiPath community.

It should work. Can you run the process in Debug mode and check it once.

can you please tell me whole regex from the beginning . To assign

@jayanth_marc

Instead of \d try with \d+

image

Hope this may help you

Thanks

1 Like

@jayanth_marc

Try below expression.

             outputString = System.Text.RegularExpression.RegEx.Match("YourValue","\d").Value
1 Like

Hi In that single digit is working fine but i dont know how many digit number i will get ?

I have given input str has test 45 bot through output empty .

Expression : System.Text.RegularExpressions.Regex.Match(split,"\d{3}").Value .

Input may be : test 1 , test 22 , test 333 , 1 , 22 , 333 .

Yes , This above expression works thanks

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.