Regex for numeric variable

Hi UiPath,

I need help with my problem.

I extracted a string value using get text activity below:

2,604,000.00 SGD

let say I want only the 2,604,000.00 without the SGD how can i do that?

and if possible convert it to this format:

2604000.00

Thanks in advance!

Hi @alvin.c.apostol26

How about this expression?

System.Text.RegularExpressions.Regex.Match(YourString,"\d.+(?=\sSGD)").Tostring

image

Regards
Gokul

image

1 Like

YourGetTextVariable=YourGetTextVariable.Split(" "c)(0)

You can also try with Split expression

Split("2,604,000.00 SGD","SGD")(0)

image

Regards
Gokul

Check out the image @alvin.c.apostol26

Split("2,604,000.00 SGD","SGD")(0).Replace(",","")

image

Regards
Gokul

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