Skip to content
Regex

Anchors

Match positions instead of characters.

#anchor#boundary

Code

regex
^abc      starts with abc
abc$      ends with abc
^abc$     exactly abc
\bword\b  word boundary
\B        non-word boundary
\A        start of string (PCRE)
\z        end of string (PCRE)
\Z        end of string (before final newline)