As of PHP 5.3.0, the POSIX Regex extension is deprecated. There are a number of differences between POSIX regex and PCRE regex. This page lists the most notable ones that are necessary to know when converting to PCRE.
PCRE_CASELESS) pattern modifier. Other
pattern modifiers are also available for changing the matching strategy.
one(self)?(selfsufficient)? on the string
oneselfsufficient with PCRE will result in matching
oneself, but using POSIX the result will be the full
string oneselfsufficient. Both (sub)strings match the
original string, but POSIX requires that the longest be the result.
:, . or =
characters to PCRE is interpreted as an attempt to use one of these
unsupported features and causes a compilation error.
| POSIX | PCRE |
|---|---|
| ereg_replace() | preg_replace() |
| ereg() | preg_match() |
| eregi_replace() | preg_replace() |
| eregi() | preg_match() |
| split() | preg_split() |
| spliti() | preg_split() |
| sql_regcase() | No equivalent |