> Instead of the "or match.group(0) != results" caper, put \Z (*not* $) at > the end of your pattern: > mobj = re.match(r"pattern\Z", results) > if not mobj:
as the string i am matching against is coming from a command line argument to a script, is there any reason why i cannot get away with just $ given that this means that there is no way a newline could find its way into my string? certainly passes all my unit tests as well as \Z. or am i missing the point of \Z ? -- http://mail.python.org/mailman/listinfo/python-list