jim_neophyte has asked for the wisdom of the Perl Monks concerning the following question:
the code that i have and not sure about is:1.0 -1.0 .9 9. -.9 -.4e08 +4.E-08 +.2e+219 2.00001e+9
thank you.our $numregex = qr/^ # may have leading plus or minus [-+]? # one of these formats must exist (?: # maybe one or more digits, then decimal, and maybe more dig +its \d+\.?\d* # or decimal followed by one or more digits |\.\d+ ) # optional sci notation (?: # "e" or "E" and plus or minus, and one, two, or three digit +s [eE][-+]\d{1,3} )? $/x;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: number regex (incl sci notation)
by VSarkiss (Monsignor) on Dec 07, 2004 at 19:21 UTC | |
by jim_neophyte (Sexton) on Dec 07, 2004 at 20:16 UTC | |
by rrwo (Friar) on Dec 07, 2004 at 20:21 UTC | |
by tye (Sage) on Dec 08, 2004 at 06:24 UTC | |
|
Re: number regex (incl sci notation)
by Anonymous Monk on Dec 07, 2004 at 23:57 UTC |