Matching the Beginning or End of a Line
^ and $
The caret ^ matches the beginning of a line when the caret appears as the first character in the search pattern.
Example: ^Hello matches only if Hello appears at the beginning of a line.
The $ matches the end of a line.
Example: TRUE$ matches only if TRUE appears at the very end of a line.