Pattern matching
PHP Manual

Anchors

Anchors
SequenceDescription
^Start of string or after a newline.
$End of string or before a newline.


Pattern matching
PHP Manual