regex - VBScript Reg. Expression not working as tested elsewhere -
i have taken common password validation reg. expression pattern regexr , modified character range. testing pattern fine on same site @ http://gskinner.com/regexr/
my problem when use within classic asp scripting on same test string, seems returning me false , life of me cannot figure out why is.
as far know vbscript regex system uses same flavour of reg expressions javascript or wrong in thought , need modify pattern vbscript?
pattern , code test within classic asp
set objregexpr = new regexp objregexpr.ignorecase = false objregexpr.multiline = false objregexpr.global = false objregexpr.pattern = "^(?=[\x21-\x7e]*[0-9])(?=[\x21-\x7e]*[a-z])(?=[\x21-\x7e]*[a-z])(?=[\x21-\x7e]*[\x21-\x2f|\x3a-\x40|\x5b-\x60|\x7b-\x7e])[\x21-\x7e]{8,12}$" str = "la@d$awdw456" remtch = objregexpr.test(str) response.write str & " = " & remtch
Comments
Post a Comment