Regex flags, dotall and multiline
Useful for work with multiline strings (i.e. strings that contain \n
)
dotall = TRUE
lets . match everything, including \n
:
## [1] │ Line 1<
## │ Line> 2<
## │ Line> 3
multiline = TRUE
makes ^
and $
match the start and end of each line rather than the start and end of the complete string:
## [1] │ <Line> 1
## │ Line 2
## │ Line 3
## [1] │ <Line> 1
## │ <Line> 2
## │ <Line> 3