Using \z, I don't seem to need multiline ...
That's because \z is always the absolute end-of-string anchor; no modifiers apply. I always use \A \z \Z because they have invariant behavior. For the same reason, I nail down the ^ $ operators by always using the /m modifier. (I then use the ^ $ operators only with newlines embedded within a string.)
Give a man a fish: <%-{-{-{-<
In reply to Re^3: How to match last character of string, even if it happens to be a newline?
by AnomalousMonk
in thread How to match last character of string, even if it happens to be a newline?
by Allasso
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |