My regex Best Practices (lifted whole from TheDamian's Perl Best Practices — highly recommended in general) include using an /xms modifier tail on every qr// m// s/// I write. This reduces the degrees of freedom of the ^ $ . operators and clarifies their function, at least for me. Coupled with the use of \A \z \Z as string start/end anchors, I find I can think a bit more clearly about the highly counterintuitive operation of regular expressions.
Give a man a fish: <%-{-{-{-<
In reply to Re: 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: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |