Getting only numbers from a text


How to get only numbers as a string from this text in the above ???

Hey @170290064

You can use below Regex to extract the digits

lets say ;

strPrice = 432,650 TL

I wanna get strPriceNumber in the assign activity

strPriceNumber = …

How to write the regex code in there ??


strText = Your Full String
strPattern = “\b[\d,.]+\b”

strValue = System.Text.RegularExpressions.Regex.Match(strText, strPattern).Value

When the number is needed as Double:

myDouble = Double.Parse(strValue , System.Globalization.CultureInfo.CreateSpecificCulture("de-DE"))



Lemme try!


Please try below code in assign activity

strPrice = 432,650 TL
strPriceNumber =System.Text.RegularExpressions.Regex.Match(inputStr,"\d+,?\d+").ToString

once it is cleared please close the topic by:
Forum FAQ - How to mark a post as a solution - News / Tutorials - UiPath Community Forum

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