Regular expression

From DreamHost
Jump to: navigation, search

A regular expression is a string that is used to describe or match a set of strings, according to certain syntax rules.

Regular expressions are used by many text editors and utilities to search and manipulate bodies of text based on certain patterns. Many programming languages support regular expressions for string manipulation. For example, Perl has a powerful regular expression engine built directly into their syntax. The set of utilities (including the editor ed and the filter grep) provided by UNIX distributions were the first to popularize the concept of regular expressions. "Regular expression" is often shortened in speech to regex, and in writing to regexp or regex (singular) or regexps, regexes, or regexen (plural).

Personal tools