Hi all,Still trying with Python and programming in general…. I am trying to get a grip with re. I am writing a program to open a text file and scan it for exactly 3 uppercase letters in a row followed by a lowercase followed by exactly 3 uppercase letters. ( i.e. oooXXXoXXXooo )If possible could you explain why I am getting "EOL while scanning string literal" when I try running the following program in Python 3. My program: import reregexp=re.compile(r"[a-z]"r"[A-Z]"r"[A-Z]"r"[A-Z]"r"[a-z]"r"[A-Z]"r"[A-Z]"r"[A-Z]"r"[a-z]) file=('///Users/joebatt/Desktop/python3.txt','r')for line in file.readlines(): if regexp.search(line): print("Found value 3 caps followed by lower case followed by 3 caps")file.close() If possible could you explain why I am getting "EOL while scanning string literal" when I try running my program in Python 3. Thanks for your help Joe
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor