Reputation: 2563
So let's say I have a string, '$3,444.11'
. How do I convert that to a float 3,444.11
? I have a form field. The user can insert "3,444.11"
, "3444.11"
, or "$3,444.11
" or "€3,444.11"
. What I need is 3,444.11
as a float. Will I have to resort to regex? Or, is there a function already that I'm overlooking?
Upvotes: 4
Views: 5679