I am trying to extract a number (in decimal) from a string. But the problem is supposed if I have a string "Was $12.00", the following function is able to extract