Re: Desperately seeking strtod()



Ingo R. Homann wrote:
Hi,

Eric Sosman wrote:

    Thanks for the suggestion.  I'm already doing something
with a similar flavor: I use a regexp to find the longest
number-ish prefix and then put it through Double.valueOf()
for a more rigorous check (the regexp matches nonsense like
"." and ".E-3").


Perhaps you may optimize your regexp then?

Ciao,
Ingo


The Javadoc for valueOf(String) in java.lang.Double, at http://java.sun.com/j2se/1.5.0/docs/api/index.html, contains sample code for regular expression screening of the input string.

Patricia
.