Regex1 - The beginnings
![Regex1 - The beginnings](https://res.cloudinary.com/audiodog/image/upload/w_640,h_155,c_scale,f_auto,q_auto/v1513806711/images/site/blog_banner_light.png)
Start and end of lines:
^ to indicate the start of a line. This finds all lines beginning with 'dog'
egrep '^dog' file.txt
This will find lines beginning dog, dogbert, doggydogdog
And just so you know, the '^' is a regular expression 'metacharacter', while 'dog' consists of 'literal' characters.
$ indicates the end of the line, so this will find lines only consisting of 'dog':
egrep '^dog$' file.txt
Good eh?