SaferWeb: Injects in Various Ruby Websites Through Regexp
homakov.blogspot.com
homakov.blogspot.com
I thought this was common knowledge, but it's a good reminder for anyone who doesn't know.
The regular expressions I _am_ familiar with would work as expected and usually need a special modifier/flag to match over multiple lines. So - I learned something new.
It has never been a common knowledge. Ask all rubyists your know and you will see it.
They typically also use and/or instead of &&/|| and potentially introduce subtle bugs into their code when the former would suffice.
All who says "I knew it" are just wanna look smarter than others. It's OK but it doesn't mean that others knew it.
In PCRE (Perl and Ruby), \z matches the end of a string; \Z matches the end of a string but allows for a single trailing newline.
In Python, \Z matches the end of a string. There is no \z.
In POSIX extended regexes, there is no \z or \Z. I think. Who knows, man.