Boundaries

Length: 00:05:07

Lesson Summary:

Now that we know how to define the start and end of a line using regular expressions, we want to consider how to limit our matches that don't have such static start or endpoints. Boundaries allow us to define the set end or beginning of a match, ensuring that our match is not part of a larger word or text; so when we search for cat, we don't get results like catastrophe or concatenate. This lesson covers both ERE, PCRE, and most modern-day regex boundaries, as well as an older method of marking boundaries that work in programs such as vim.

Get the lesson files here!:


This lesson is only available to Linux Academy members.

Sign Up To View This Lesson
Or Log In

Looking For Team Training?

Learn More