PHP Manual
Function Reference
Text Processing
Parle
Pattern matching
Character representations
Character classes
Unicode character classes
Alternation and repetition
Anchors
Grouping
Alternation and repetition
Grouping
Pattern matching
PHP Manual
Anchors
Anchors
Sequence
Description
^
Start of string or after a newline.
$
End of string or before a newline.