December 2018
Beginner
452 pages
12h 17m
English
We've already briefly mentioned line anchors. With the explanations we have presented up until now, we were only able to search for words in a line; we weren't yet able to set expectations on where those words were in the line. For this, we use line anchors.
In regular expressions, the ^ (caret) character signifies the beginning of a line, and a $ (dollar) represents the end of a line. We can use these within a search pattern, for example, in the following scenarios:
The first usage, looking for something at the beginning of a line, should be pretty clear. The following example, which uses