On 8/16/06, Bil Kleb <Bil.Kleb / nasa.gov> wrote:
> Xavier Noria wrote:
> > Have a look at the regexp in
> >
> >   perldoc -q float
>
> /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/
>
> Ouch!
>
> Thanks; I think.  :)

Quick caveat - that's for a c float (as mentioned in that perldoc
snippet). Ruby float (& other numeric) literals allow the underscore
character (with restrictions) as well. So really, it depends on
exactly what you're parsing and why.

-A