POSIX Extended Regular Expression Functions

These functions all take a regular expression string as their first argument. PHP uses the POSIX extended regular expressions as defined by POSIX 1003.2. For a full description of POSIX regular expressions, see the regex man pages included in the regex directory in the PHP distribution. These man pages are usually in section 7, so to view them run one of the following commands (depending on your system):

man 7 regex 
man -s 7 regex 

A basic lesson on POSIX regular expressions is available at www.delorie.com/gnu/docs/rx/rx_3.html, and a tutorial-style introduction can be found at www.htmlwizard.net/resources/tutorials/regex_intro.html.

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.