Syntactic Confectionery Delight | |
PerlMonks |
Re: Re: Re: Re: Validating Numbers in CGI Script?by japhy (Canon) |
on May 10, 2001 at 19:42 UTC ( [id://79440]=note: print w/replies, xml ) | Need Help?? |
Hmm, actually, I think I meant to make the regex be /^-?(?=\d|\.\d)\d*\.?\d+$/. Yes, that looks far more sane. The other could have matched "1234.", which isn't proper. This one can match "1234", ".1234", and "12.34".
japhy -- Perl and Regex Hacker
In Section
Seekers of Perl Wisdom
|
|