[PHP3] PHP Regex Not Posix Compliant From: Sergio Rademacher (sergio <email protected>)
Date: 02/29/00

Well, apparently PHP it's no 100% POSIX 1003.2 compliant in it's regular
expresions as it claims. The backreferences aren't working in ereg, eregi
(but ereg_replace allows you to use it in the second argument). The simple
code:

eregi("(.*)=\\1","foo=foo",$m);
print $m[1];

NEVER MATCHES (although in preg_match works). Should I report this to the
bug database?
                             
                  Sergio.-

PS: Besides, note that Posix says that backreferences are a single
backslash, not to two and it never says so in the php documentation, except
in ereg_replace. (the documentation in preg_match is also broken, it says
that you should use only one backslah, but preg_match_all says that you
should use two!!!)