I need to check if the string fulfil the conditions:
- at least 4 characters
- must consist of only letters
- at least 1 upper letter
I've got:
if not re.fullmatch(r'^(?=.*[A-Z])(?=.*[a-z]).{4,}$', 'ab7c'):
print('The string is wrong')
May I know which conditions were not met? In my example, they are:
- must consist of only letters
- at least 1 upper letter