$ matches at the end of a line. For example, the end$ will match against "It was the end" but not "the end was near"