Concepts

  • Regular expressions are used to match text. The term is used to describe the loosely defined text-matching language as well as the patterns themselves. A regular expression is often called a regex or a regexp.

  • Regular expressions are made up of metacharacters (with special meaning) and literals (everything that is not a metacharacter).

  • The backslash character (\) turns off (escapes) the special meaning of the character that follows, turning metacharacters into literals. For nonmetacharacters, it often turns on some special meaning.

Get LPI Linux Certification in a Nutshell, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.