Next: Back-references and Subexpressions, Previous: The Backslash Character and Special Expressions, Up: Regular Expressions [Contents][Index]
The caret ‘^’ and the dollar sign ‘$’ are meta-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.