Help with string manipulation

Hello and thank you for any help.

I am working on a process where I use data scraping to pull a value from a website. The value being pulled is US currency amounts and they appear as USD 200.00 or USD 558.0, etc. I need to perform logic on the value scraped but I cannot do that with the "USD " on the front of it. How do I remove the "USD " and leave just the digits?

Thank you

1 Like

You can explore substring to get the value that you want @mworth123

3 Likes

@ pattyricarte - Thank you but I’m not seeing substring in the list of activities. How do I access it?

1 Like

@mworth123 Maybe i can give you some article to be your reference.right now i cant give example.im driving going to work my apologies.

3 Likes

@ pattyricarte - Thank you, I can wait. Your safety is more important than my process

2 Likes

@ pattyricarte - I found this but it’s throwing an error. I am a noob
2019-10-14_164805

1 Like

Before it was saying I can’t convert an integer to a string so I tossed in the To.String - it didnt help

1 Like

@mworth123

Try below one.

Str = “USD 200.00”

   requiredStr = Str.Replace("USD","").Trim
1 Like

Hi @mworth123

My apologies for the late reply.What exactly do you want to do.?

cheers :smiley:

Happy learning :smiley:

3 Likes

By the way you can read this as your reference to your issue. @mworth123

cheers :smiley:

Happy learning :smiley:

2 Likes

Hi @mworth123,

Get the string and use if, like if yourstring.contrains(USD)

Assign … Yourstring = yourstring.replace(“USD “,””) this will give only the valeu you have whant, now do the same to other curencies

@Luis261980 - Thank you, that seems to work!

1 Like

@laksham - Thank you, that seems to work!

1 Like

@mworth123

Great. Could you please close this thread my marking above post as solution. It will help others also the one who are looking for same solution.

1 Like

@lakshman - Thank you, I thought I had. It’s done now

2 Likes

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