Getting only numbers from a text

image

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
\d+,?\d+

lets say ;

strPrice = 432,650 TL

I wanna get strPriceNumber in the assign activity

strPriceNumber = …

How to write the regex code in there ??

grafik

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"))

grafik

Alright!

Lemme try!

.

@170290064
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.