String to number problem

hi there
What I am doing is making a site interact with google maps via the javascript API.
I am having an issue with converting a set of coordinates from a string to a number.
The string I receive after I receive them from the json string is formatted like this “(-28.45417, 153.33635)” that’s every thing inside the quotation marks including brackets.
So I tried spitting the string at the “,” and then Farray=parseFloat()

then on the Farray[0] and Farray[1]
It appears Farray[0] still works out to be NaN :confused: though parseFloat() did get the correct longitude which is Farray[1]:D.
Can anyone see how I get the Farray[0] to be a number?

Farray[0] will contain (-28.45417 , which cannot be evaluated as a number.

Try:

Farray[0] = Number( Farray[0].replace( /[^\\d\\.\\-\\+]/g, "" );

Thanks I solved this by using PHP before the coods were sent :

$coords = trim($coords, "(..)");

though your method would also work.