Anchors are special characters that anchor regular expressions to particular places in a string. The most common anchors are the caretˆand the dollar sign $. The caret matches the start of a line. The pattern /ˆThe/ matches the word The only at the start of a line. Thus, the caretˆhas three uses: to match the start of a line, to indicate a negation inside of square brackets, and just to mean a caret. (What are the contexts that allow grep or Python to know which function a given caret is supposed to have?) The dollar sign $ matches the end of a line. So the pattern $ is a useful pattern for matching a space at the end of a line, and /ˆThe dog\.$/ matches a line that contains only the phrase The dog. (We have to use the backslash here since we want the . to mean "period" and not the wildcard.)