PHP Regular Expression Types
There are two sets of PHP functions that facilitate regular expressions. The preferred set is the PCRE (Perl-Compatible Regular Expressions) library. You can identify these functions because, in PHP, they start with the prefix
preg. Examples of PCRE regular expression functions are
preg_match_all(). The other regular expression family available within PHP is POSIX (Extended Regular Expressions). These functions begin with the prefix
ereg and are included in PHP primarily for backward compatibility. The
ereg instructions have been deprecated since PHP 5.3.0 and are mentioned here only because you’ll be exposed to them as you explore PHP regular expression instructions ...