You should use a lowercase z instead of a capital. An uppercase Z allows for a newline to be at the end of the string.