The following piece of code does not match foo2
in the multiline string:
re.match("^foo2", "foo1\nfoo2\nfoo3",re.MULTILINE)
Why is that? The documentation at python.org says in MULTILINE
mode the Caret (^
) also matches at the beginning of each line. I've also tried the "raw string" versions with r
already, no joy. Using findall
also does not help.
I'm obviously missing something here..