This document introduces regular expressions (regex) in PHP. It discusses the basic syntax of regex including patterns, indicators, quantifiers and logical operators. It provides examples of using the ereg and preg functions in PHP to perform matches and replacements using both POSIX and Perl-compatible regex. Common regex rules are also explained including matching characters, character classes, beginning/end of string, alternation and quantifiers.