R

TestRegex

End of string

\Z

Matches the end of a string only. Unlike $, this is not affected by multiline mode.

Examples

Match Sample:
end of string
Regex Example:
\w+\Z
PCRE PYTHON

Share & Embed

Use this snippet to display this token on your own site.

<!-- Embed Regex Token: \Z -->
<code class="regex-token">\Z</code> - End of string
<small><a href="https://testregex.com/cheatsheet/end-of-string-slash-z">See details</a></small>