finding multiple chars in password
I just interacted with an authentication system that one of it password rules is not to repeat a certain character 3 or more times. So it mad me think of how I would accomplish this validation if I wrote the code. First thing that came to mind is a regular expressions (RE), i've tried and tried and couldn't figure out a RE that would solve any character repeated more than 3 times in a string. I guess I'm not an expert in RE! If anyone can figure this out, i'd appreciate knowing the RE. Therefore, i moved my logic to just loop within a loop. Example below. <cfloop from="1" to="#len(variables.tmpPassword)#" index="pos"> <cfset curChar = Mid(variables.tmpPassword,pos,1)> <cfset curCharCount = 0> <cfset curPos = FindNoCase(curChar,variables.tmpPassword)> <cfloop condition="#curPos# GT 0"> <cfset curPos =...