On Sunday, April 28, 2002, at 07:13 , Mat Harrison wrote:

> what sort of regex's should i be looking at to validate a username and
> password field so that input can only be up to and including 15 chars long
> and does not contain any special characters?

you want to limit usernames and passwd's to

        [a-zA-Z0-9]

without any of the non-alphanumeric tokens....

{ not a good passwd strategy if I may kvetch }

my $MAXWORD = 15;
my $pattern = qr/^\w{1,$MAXWORD}$/;

cf perldoc perlre
        


ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to