Anchoring (GNU Grep 3.7)
From Get docs
Grep/docs/latest/Anchoring
Next: Back-references and Subexpressions, Previous: The Backslash Character and Special Expressions, Up: Regular Expressions [Contents][Index]
3.4 Anchoring
The caret ‘^
’ and the dollar sign ‘$
’ are special characters that respectively match the empty string at the beginning and end of a line. They are termed anchors, since they force the match to be “anchored” to beginning or end of a line, respectively.