I recently posted this to cflib... -----Original Message----- From: Richard White [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 24, 2007 10:28 AM To: CF-Talk Subject: confirming string length, case, and alphanumeric
hi, my system generates a password with the following criteria: must be exactly 8 characters in length must have at least 1 number must have at least 1 uppercase letter must have at least 1 lower case letter however, the passwordGenerator i am using doesnt always get it right, even though it is supposed to. It probably gets it right 7 out of 10 times. I got it from someone on another post and cant see where the problem is. So i thought that when i generate the password i can write some cfscript to check if it meets the criteria and if not then it regenerates it and checks it again i know there must be a way of doing this in cfscript by using regular expressions var anUpperCase = /[A-Z]/; var aLowerCase = /[a-z]/; var aNumber = /[0-9]/; but i cant think on how to apply it and make it work. does anyone have any sample code that i can use, or can anyone provide me with any help. thanks very much, i really appreciate any help ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267546 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

