For Programmers: Free Programming Magazines  


Home > Archive > ASP > June 2007 > ASP regular expression check for password needing numerals and characters









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ASP regular expression check for password needing numerals and characters
.Net Sports

2007-05-14, 6:56 pm

I'm trying to only allow password entries that have at least one
numeric character, and 7 to 15 characters long. The below script is
not filtering it properly, it keeps saying all the entries are bad
when i am entering mixed passwords:

<%'' ASP validation for password criteria
dim strpassword
strpassword = request.form("password")
Function CheckString(strpassword, strRegExp)
Dim re
Set re = new RegExp

re.Pattern = strRegExp

CheckString = re.Test(strpassword)
End Function

'Make sure it's in the format of at least one numeral, 7 to 15
characters
If CheckString(strpassword, "^(?=.*\d).{7,15}$") then
response.write "good"
Else
response.write "bad"
End If

%>

???
netsports

ThatsIT.net.au

2007-06-16, 6:55 pm

Your code works fine for me

try writing password to screen to check you passing the right string

response.write strpassword



".Net Sports" <ballz2wall@cox.net> wrote in message
news:1179164751.643173.185430@l77g2000hsb.googlegroups.com...
> I'm trying to only allow password entries that have at least one
> numeric character, and 7 to 15 characters long. The below script is
> not filtering it properly, it keeps saying all the entries are bad
> when i am entering mixed passwords:
>
> <%'' ASP validation for password criteria
> dim strpassword
> strpassword = request.form("password")
> Function CheckString(strpassword, strRegExp)
> Dim re
> Set re = new RegExp
>
> re.Pattern = strRegExp
>
> CheckString = re.Test(strpassword)
> End Function
>
> 'Make sure it's in the format of at least one numeral, 7 to 15
> characters
> If CheckString(strpassword, "^(?=.*\d).{7,15}$") then
> response.write "good"
> Else
> response.write "bad"
> End If
>
> %>
>
> ???
> netsports
>


Idon

2007-06-20, 11:55 am

Christina Aguilera and Alyson Hannigan Lesbians Get Messy With Food!
http://www.shockingtheworld.com/b?watch=1673286

hollywood jay video z 300 movie quote hot video sex gay movie britney hair her shaved spear
clip funny site video lesbian mom movie free xxx porn video adult picture and video de la tormenta tube video
clip dog funny video exclusive xxx movie poze si filme porn gratis juegos eroticos gratis video porn de muestra gratis
google hot video madonna album movie world only porn movie anal clip funny mini

libro gratis
daddy daughter video
rape xxx movie
clip funny monkey video
gratis musica video y yahoo
free hot sex very video
free sex granny movie
video de paris hilton
adult movie actors
free online lesbian porn video
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com