Once again, I corrected a posting where someone had used $ instead of \z to anchor a regex "at the end" in a way that would have opened up a potential security hole. (The string would have matched ".foo\n" as well as ".foo", which could have led to some interesting mismatches later.)
I realize that this is a feature, but it's a subtle misfeature. I wish more people were educated about this situation.
Teach a man to fish... (Score:1)
Re: (Score:1)
http://www.regular-expressions.info/anchors.html [regular-expressions.info]
Help me add it to perl101.org (Score:2)
--
xoa
Re: (Score:1)
Re: (Score:2)
--
xoa
Re: (Score:1)
PBP / perlcritic (Score:1)
In "Perl Best Practises".... Damian suggests always using