in reply to validation of posted data.

A minor point but your regex allows "" (the empty string) to be used as a valid username.

Yves / DeMerphq
---
Writing a good benchmark isnt as easy as it might look.

Replies are listed 'Best First'.
Re: Re: validation of posted data.
by Anonymous Monk on Aug 01, 2002 at 16:03 UTC
    hi there, i have a seperate piece of code to validate blanks anlong with usernames > 20 < 3 chars
      All of that can be done in a regex:
      /\A\w{3,20}\z/
      Will match only word sequences that are 3 to 20 characters long ONLY.

      Yves / DeMerphq
      ---
      Writing a good benchmark isnt as easy as it might look.