Absolute end of string
\zMatches the end of a string only. Unlike $, this is not affected by multiline mode, and, in contrast to \Z, will not match before a trailing newline at the end of a string.
Examples
Match Sample:
absolute end of string
Regex Example:
\w+\z
PCRE
Share & Embed
Use this snippet to display this token on your own site.
<!-- Embed Regex Token: \z --> <code class="regex-token">\z</code> - Absolute end of string <small><a href="https://testregex.com/cheatsheet/absolute-end-of-string">See details</a></small>