Categories
How to add uppercase and lowercase characters to this regular expression?
Greetings. Tell me how to correctly write this regular expression for upper and lower letters and numbers. regex = re.compile(r'.*(.)(\1)(\1)(\1).*$')
regex = re.compile(r'.*(.)(\1)(\1)(\1).*$')
Answer the question
In order to leave comments, you need to log in
Read about flags. In this case add re.I regex = re.compile(r'.*(.)(\1)(\1)(\1).*$', re.I)
regex = re.compile(r'.*(.)(\1)(\1)(\1).*$', re.I)
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question