I have a block of code that is scraping a very poorly formatted price. I want to just use regular expressions to clean it up.
They are sending
$ 3 58
I want to remove the $ and space and replace the space in between dollars and cents with a . so I get:
3.58
I can get rid of the $ and leading space but I am really stuck on the substitution. I know that
Regex (.*) returns everything
Regex \ (.*) returns '3 58'
But what I really want is
3.58
I am trying to do this inside of a program called content grabber so all I have access to is the regular expressions.