in reply to Check user input - reimplementation

kiat,

Your numeric check is pretty weak. I think it should at least allow for a leading '-'. For some ideas for numeric regex checks see perlman: perlfaq4 or do perldoc -q 'is a number' from your command line.

YuckFoo

  • Comment on Re: Check user input - reimplementation

Replies are listed 'Best First'.
Re: Re: Check user input - reimplementation
by kiat (Vicar) on Dec 15, 2003 at 23:28 UTC
    Thanks YuckFoo!

    In the context I'm using it, it's really just checking for a number - like an id thing that's associated with a name. I'll look up the 'is a number' check to see how I can modify that part.