[prev] [index] [next]

Regular Expressions

A regular expression (regexp) is a pattern that specifies properties of text.

Regular expressions are used to locate pieces of text in a file.

In other words, they provide a searching mechanism for plain text.

In the Unix environment:

  • a lot of data is available in plain text format
  • many tools make use of regular expressions for searching
  • effective use of regular expressions makes you more productive

A POSIX standard for regular expressions defines the "pattern language" used by many Unix tools.