Theory and history.
Regular expressions (regexp) is a formal language for searching and manipulating with substrings in text. Regular expressions is based on usage if meta-symbols (wildcard characters). This is, actually, a string pattern, which formalizing a search rule (wiki) .
There exists two kinds of regular expressions:
- POSIX (older one, basics)
- PCRE (perl-compatible regular expressions, more extended)