Date: 10/26/99
- Next message: kk: "[PHPLIB-DEV] cvs commit"
- Previous message: Kirill Maximov: "Re: [PHPLIB-DEV] no_next_fetch in db_oracle.inc"
- In reply to: Massimiliano Masserelli: "Re: [PHPLIB-DEV] oohforms bad escape sequence"
- Next in thread: Massimiliano Masserelli: "Re: [PHPLIB-DEV] oohforms bad escape sequence"
- Reply: Massimiliano Masserelli: "Re: [PHPLIB-DEV] oohforms bad escape sequence"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> > 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.
- Next message: kk: "[PHPLIB-DEV] cvs commit"
- Previous message: Kirill Maximov: "Re: [PHPLIB-DEV] no_next_fetch in db_oracle.inc"
- In reply to: Massimiliano Masserelli: "Re: [PHPLIB-DEV] oohforms bad escape sequence"
- Next in thread: Massimiliano Masserelli: "Re: [PHPLIB-DEV] oohforms bad escape sequence"
- Reply: Massimiliano Masserelli: "Re: [PHPLIB-DEV] oohforms bad escape sequence"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

