« Alternation and repetition
Grouping »
Bejson.com
PHP Manual
Pattern matching
Anchors
Anchors
Anchors
Sequence
Description
^
Start of string or after a newline.
$
End of string or before a newline.