New submission from Jonathan Epstein: All 3 of these regex's should match, but in practice only m2 does. Found deep in the bowels of debugging a larger problem.
import re mainProjectsPath = '/groups/larvalolympiad/larvalolympiad/Projects/' m1 = re.match('larvalolympiad',mainProjectsPath) m2 = re.match('.*larvalolympiad.*',mainProjectsPath) m3 = re.match('/larvalolympiad/',mainProjectsPath) print(m1) print(m2) print(m3) ---------- components: Regular Expressions messages: 212463 nosy: Jonathan.Epstein, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: literal re fails to match type: behavior versions: Python 2.7, Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20810> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com