Argh it's a good thing I don't pay my salary on days like this. I copied some regex patterns from my client side Javascript to server side ASP and the email pattern works no probs but an identical function for the password pattern has cost my boss 6 hours today (our little secret).
Function validatePassword(strPass)
Dim regEx
Set regEx = new RegExp
regEx.IgnoreCase = false
regEx.global = false
regEx.Pattern = "^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,10}$"
ValidatePassword = regEx.Test(strPass)
End Function
It's a simple 1 upper, 1 lower, 1 digit, 6-10 chars pattern and there's zero doubt that it matches as it should but ex. 3DMM9igggg returns false, but gDMM9igggg returns true. It works fine in JS, here: http://www.regular-expressions.info/javascriptexample.html, and in a couple other testers I tried.
WTF? Can somebody lend me their eyes for a sec?
Thanks