Removing symbol from a get text activity

Hi everyone, Im running in to a issue, when im using the get text activity to get “$12.64” I want to just take the number not the “symbol” is there any way I can omit that? And some digits do not have the symbol and some do. What is a good work around?

hi @seanp92

Try using the OCR activities for get text, there you can scale up or down as per your preference…

1 Like

thanks I will give it a try

Hi

I would recommend string.replace(“$”,“”).

Please try this as well if it solves your purpose

2 Likes

how would i do that on a get text activity?

@seanp92
Use it in an assign activity after the get text activity.

Adding to his earlier point, do a simple if condition of contains for “$”, if true replace else nothing

This will be done on the output of the get text activity

Fine
Hope these steps would help you
—Use Get text activity and get the output with a variable of type string named str_output
—now use a if condition like this
str_output.ToString.Contains(“$”)
If true it will go to THEN part where we can use a assign activity like this
str_output = str_output.ToString.Replace(“$”,””)

Now we can use that variable str_output where we want

Hope this would help you
Cheers @seanp92

1 Like

This is not needed and will add execution time to the robot. The String.Replace function already performs this check.