A regular expression is a sequence of characters used to match, extract, and/or replace patterns in text.
There are many different implementations of regular expressions. This means a regular expression that works on one platform may not be supported on an other.
Because of its widespread use, it in turn has introduced new syntax. Some of these have then been brought back into the original Perl implementation.
PHP used to support POSIX Extended regular expressions through the
ereg set of functions. This was deprecated by PHP 5.3 in favour of the PCRE implementation.
The PHP Group documents some notable differences between POXIS and PCRE. These should help getting started on converting between the two formats, though isn’t an extensive comparison.