Bugs item #1104608, was opened at 2005-01-18 17:49 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=1104608&group_id=5470
Category: Regular Expressions Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: rengel (engel_re) Assigned to: Gustavo Niemeyer (niemeyer) Summary: Wrong expression with \w+? Initial Comment: str = 'match the url www.junit.org with following regex' regex = re.compile('(www\.\w+?\.\w+?)') print regex.sub('<span class="url">\1</span>', str) # It produces match the url <span class="url">www.junit.o</span>rg with following regex # It should produce match the url <span class="url">www.junit.org</span> with following regex ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1104608&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com