A regular expression is a method of representing a string matching pattern. Regular expressions enable strings that match a particular pattern within textual data records to be located and modified and they are often used within utility programs and programming languages that manipulate textual data.
For example, a regular expression can be used to replace the word "Snake" with the word "Serpent" throughout an entire piece of text, or a regular expression could be used to locate particular pieces of text containing both the words "Lion" and "Lamb" on the same line. Regular expressions are extremely powerful.
Regular expressions are made up of three types of components:
The [[syntax?]] of regular expressions varies across application programs. The awk extraction and reporting language uses superset of the [[syntax?]] called [[extended_regular_expression_syntax?]].