Re: [PHPLIB-DEV] oohforms bad escape sequence From: ak <email protected>
Date: 10/26/99

> > if (ereg("([a-zA-Z_]+)[([0-9]+)]", $el["name"], $regs)) {
> > because [ and ] need no escape.

> [ and ] do need escape in regex when they are intended to be matched
> literally. PHP3 manual is not too clear on this issue, and at the moment
> I don't have the time to go through php3 sources.

You are right. I tested it with ereg("[", "[", $regs) and ereg("\[", "[", $regs).
Only the first version works as expected.
But if you say "error_reporting(255);" you get this:
Warning: Bad escape sequence: \[ in test.php3 on line 23

Looks like the error reporting code of php needs a fix.

Alex
-
PHPLIB Developers Mailing List. Send messages to <phplib-dev <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-dev-request <email protected>> in
the body, not the subject, of your message.