September 2001
Intermediate to advanced
768 pages
32h 45m
English
Regular expressions (often shortened to just regex) are patterns that describe a set of strings. Regular expressions are constructed analogously to arithmetic expressions, by using various operators to combine smaller expressions. They are a very powerful tool for matching or replacing text. PHP has a function-oriented interface to regular expressions, as opposed to Perl, where regular expressions are implemented at the language level. PHP supports two kinds of regular expressions out of the box: POSIX Extended and Perl-compatible. The functions for both are similar, but Perl-compatible expressions support many more options and are considered to be faster and more powerful in general.
Read now
Unlock full access