Regular Expressions

Most of the search mechanisms listed in this chapter use regular expressions in one form or another. A regular expression is a mathematical mechanism for specifying the ordering of symbols. Historically, regular expressions originated from discussions of the Theory of Computation, a seriously hard-core branch of mathematics that is far removed from the day-to-day rigors of, say, locating the smutty email to your girlfriend that you misplaced in some gargantuan file system at work.

However, the same principles govern both tasks. To get full value for your Linux dollar, you will need some understanding of regular expressions and how they are used to specify search patterns.

Regular expressions exist to give you a mechanism ...

Get Linux® Desk Reference, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.