I have a txt file, need to find words that are min 6 digits, have uppercase and lowercase letters, digits and punctuation marks. What is my mistake with re?
import re
word_list = []
with open('passwords.txt') as f:
for line in f.readlines():
word_list += re.findall(r'^?=.*[A-Z])(?=.*[!@#$&*])(?=.*[0-9])(?=.*[a-z]).{6}', line)