Up: tips   [Contents][Index]


7.1 Matching newlines with the . subpattern

By 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:


Up: tips   [Contents][Index]

This document describes version 0.4.0-devel.2 of CRE2.