in reply to Disambuating $ in (especially /m) regexps
/foo$.*^bar/ms - is this $. (the variable) or EOL followed by random stuff?
It's the variable. Fixed:$ perl -E'say qr/foo$.*^bar/ms' (?^ums:foo*^bar)
$ perl -E'say qr/foo(?:$).*^bar/ms' (?^ums:foo(?:$).*^bar)
|
|---|