Regexp--Common
Regexp--Common copied to clipboard
Make delimited handle $esc\s
I was surprised that "'\n'" =~ /$RE{quoted}/
succeeds but "'\\\n'" =~ /$RE{quoted}/
fails, unless I explicitly add the s
modifier ("'\\\n'" =~ /$RE{quoted}/s
).
I gather the problem is that, while a $RE{delimited}
can generally contain any characters except $esc
and $cdel
, it can only contain .
in the position following $esc
, which doesn't include \n
(without the s
modifier).
Should $RE{delimited}
add the s
modifier itself?