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_replace(), preg_split(), preg_match(), and 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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access