Regular expressions

Literal characters in regular expressions

The simplest regular expression is a series of letters and numbers, possibly including white space (tabs or space characters), that have no special meaning. Such a regular expression consists of ``literals''; that is, normal letters, which match only an identical letter in the data being searched. For example:

This is a regular expression

When an editor searches for a literal regular expression, it can only score a ``hit'' if it finds exactly that sequence of characters in the data it is searching. The example regular expression above will not, for example, match the following string:

This is a
regular expression

because there is a newline in the middle of it which was not specified in the regular expression.


© 1999 The Santa Cruz Operation, Inc. All rights reserved.
UnixWare 7 Release 7.1.1 - 5 November 1999