Next: , Previous: The Backslash Character and Special Expressions, Up: Regular Expressions

3.4 Anchoring

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.