. subpatternBy default the dot subpattern . matches any character but
newlines; to enable newline matching we have to enable the s flag
using the special subpattern ‘(?<flags>)’ or
‘(?<flags>:<re>)’, where <flags> is a sequence of
characters, one character for each flag, and <re> is a regexp
subpattern. Notice that the parentheses in (?:) are
non–capturing.
So let’s consider the text ciao\nhello:
ciao.hello does not match because s is
disabled.
(?s)ciao.hello matches because the subpattern
(?s) has enabled flag s for the rest of the pattern,
including the dot.
ciao(?s).hello matches because the subpattern
(?s) has enabled flag s for the rest of the pattern,
including the dot.
ciao(?s:.)hello matches because the subpattern
(?s:.) has enabled flag s for the subpattern .
which is the dot.
This document describes version 0.4.0-devel.2 of CRE2.