mworth123
(Michael Worth)
October 14, 2019, 11:29pm
1
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
mworth123
(Michael Worth)
October 14, 2019, 11:33pm
3
@ 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
mworth123
(Michael Worth)
October 14, 2019, 11:40pm
5
@ pattyricarte - Thank you, I can wait. Your safety is more important than my process
2 Likes
mworth123
(Michael Worth)
October 14, 2019, 11:48pm
6
@ pattyricarte - I found this but it’s throwing an error. I am a noob
1 Like
mworth123
(Michael Worth)
October 14, 2019, 11:49pm
7
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
lakshman
(Ganta lakshman)
October 15, 2019, 1:27am
8
@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
Happy learning
3 Likes
By the way you can read this as your reference to your issue. @mworth123
Hi,
if you are a beginner in the world of automation and would like to know how you can manipulate text based on the solutions available in the VB.NET code and using REGEX (regular expressions) then you are in the right place.
In the topic below, you will learn how to easily extract data from any part of the search text using various methods.
The topic includes solution examples with descriptions and graphics to better understand the topic for functions such as:
Split
Substring
Left
Right
R…
cheers
Happy learning
2 Likes
Luis261980
(Luis Nunes)
October 15, 2019, 6:33am
11
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
mworth123
(Michael Worth)
October 15, 2019, 9:54pm
12
@Luis261980 - Thank you, that seems to work!
1 Like
mworth123
(Michael Worth)
October 15, 2019, 9:54pm
13
@laksham - Thank you, that seems to work!
1 Like
lakshman
(Ganta lakshman)
October 16, 2019, 12:55am
14
@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
mworth123
(Michael Worth)
October 16, 2019, 4:05pm
15
@lakshman - Thank you, I thought I had. It’s done now
2 Likes
system
(system)
Closed
October 19, 2019, 4:05pm
16
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.