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.
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.