Bugs item #1448325, was opened at 2006-03-12 09:46 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1448325&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Regular Expressions Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Don Allen (donallen) Assigned to: Gustavo Niemeyer (niemeyer) Summary: re search infinite loop Initial Comment: Given the attached test.csv file, the following program loops forever (can't even ^c): import re orig = open('test.csv') file_contents = orig.read() orig.close() find_line = re.compile(r'^(".*")?(,(".*")?)*\n') search_result = find_line.search(file_contents) print search_result.span() The corresponding tcl program works correctly: set orig [open test.csv r] set file_contents [read $orig] close $orig regexp -indices {^(".*")?(,(".*")?)*\n} $file_contents \ indices puts "Indices were $indices" Both tests were run on a TP G41 running Gentoo Linux. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1448325&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com