 following table lists the different
possibilities for matching newline characters in Perl and PCRE2:
<pre>
                          Default   Change with

  . matches newline          no     PCRE2_DOTALL
  newline matches [^a]       yes    not changeable
  $ matches \n at end        yes    PCRE2_DOLLAR_ENDONLY
  $ matches \n in middle     no     PCRE2_MULTILINE
  ^ matches \n in middle     no     PCRE2_MULTILINE
</pre>
This is the equivalent table for a POSIX-compatible pattern matcher:
<pre>
            