[Apologies for following up so late. I've just hit the same problem.]
Why this asymmetry? This comment in re2.h makes it sound as if multi-line mode didn't work at all in Perl syntax:
// The following options are only consulted when posix_syntax == true.
// (When posix_syntax == false these features are always enabled and
// cannot be turned off.)
// perl_classes (false) allow Perl's \d \s \w \D \S \W
// word_boundary (false) allow Perl's \b \B (word boundary and not)
// one_line (false) ^ and $ only match beginning and end of text
The work-around of (?m) isn't mentioned. I find that confusing, user-unfriendly and unnecessarily complicated.
I have a patch including tests that makes set_one_line(false) work for me with Perl syntax enabled.
Please let me know whether you'd be interested in a PR.
Thanks,
Michael