regex and newlines

John Ehresman (jehresma@archaeopteryx.harvard.edu)
05 Jan 1995 23:52:28 GMT

I'm having a problem with regex stopping a generic character match at a
newline. For example, the following code will print "1" and not "1\n2"

import regex

r = regex.compile("image \(.*\)")
r.search("image 1\n2")
print r.group(1)

Is there a flag I can set so .* will include the newline in the match?

Thanks,

John