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