Bug #3014: octal character versus regex backreferences
| From: | cmiller at surfsouth dot com | Date: | Tue, 21 Dec 1999 02:18:58 +0000 |
| Subject: | Bug #3014: octal character versus regex backreferences | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-13888@lists.php.net to get a copy of this message | ||
From: cmiller@surfsouth.com
Operating system: any
PHP version: 3.0 Latest CVS (20/12/1999)
PHP Bug Type: Feature/Change Request
Bug description: octal character versus regex backreferences
ereg("fla(r[gpm]) wobba\1", $foo)
Note the ``\1'' -- is that an octal 1 in my charset, or a backreference?
The backslash-x-number notation is great for hexidecimal, but the backslash-number notation
conflicts with the notation for backreferences (in ereg(), e.g.)
Are there backreferences? The manual refers us to the regex(7) manpage, which does describe them.
Even if there's not, I recommend backslash-zero-octal, as historically, octals are represented
with preceding zeros. Backreferences are positive integers (which mortals usually describe with no
leading zero), so there's no conflict.