in reply to numeric comparison

I recently wrote a regex to match a floating-point number, including (optional) scientific notatation. This looks like a good chance to get some critique, as well as (possibly) help you. I think it's a bit more complete than the regexen I've seen so far in this post, though I'm sure it's far from perfect.

/^[+-]?(?=\.?\d)\d*(\.\d*)?([Ee][+-]?\d+)?$/

HTH

Update: Well, at least my regex is validated by the Perl Cookbook, as shown in dbp's post. Though I'm curious to know why they used (?=\d|\.\d) instead of (?=\.?\d), when it seems to me the latter is more concise... anyone know of a good reason?

--
3dan