
April 19, 2006
4:44 p.m.
Dinu Gherman <gherman@darwin.in-berlin.de> writes:
re.findall(re.compile("START.*END"), "foo START bar END foobar") ['START bar END']
re.findall(re.compile("START.*END", re.X), "foo START bar \n END foobar") []
re.compile("START.*END", re.S).findall("foo START bar \n END foobar") ['START bar \n END']
Ohne die Option re.S passt "." nicht auf ein Newline. Bernhard -- Intevation GmbH http://intevation.de/ Skencil http://skencil.org/ Thuban http://thuban.intevation.org/ _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de