I thought this was common knowledge, but it's a good reminder for anyone who doesn't know.
They typically also use and/or instead of &&/|| and potentially introduce subtle bugs into their code when the former would suffice.
It has never been a common knowledge. Ask all rubyists your know and you will see it.
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.
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.
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.