To use `` \\` `` and `\\'` is better than `^` and `$`. `^` is anchor of beginning of line and `$` is end of line.
On the other hand, `` \\` `` is anchor of beginning of string and `\\'` end of string.