\Z is actually equivalent to:
In other words, it matches a line ending at the end of the string. Not necessarily what you want, although probably rarely harmful.
The correct regexp syntax to match the absolute end of the string is \z.
If you want to match the whole string use: \A and \z.
fixed #86 - \z instead of \Z for matching the absolute end of a string
根據原作者#86, 更正匹配字串結束的 regexp