Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def passwordCheckRegExp(inputString)
- if inputString.length < 5 then
- return false
- end
- x = 0
- capital_letter = false
- small_letter = false
- digit = false
- while (x < inputString.length)
- if inputString[x] >= 'A' and inputString[x] <= 'Z' then
- capital_letter = true
- end
- if inputString[x] >= 'a' and inputString[x] <= 'z' then
- small_letter = true
- end
- if inputString[x] >= '0' and inputString[x] <= '9' then
- digit = true
- end
- x = x + 1
- end
- if capital_letter == true and small_letter == true and digit == true then
- return true
- else
- return false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment