[TYPO3-core] RFC: Small change to class.t3lib_install.php - eregi to preg_match
Ernesto Baschny [cron IT]
ernst at cron-it.de
Wed Jun 28 00:08:13 CEST 2006
Karsten Dambekalns schrieb am 27.06.2006 23:42:
>> Are you sure [[:space:]] and [[:alnum:]] are available in the PCRE
>> environment? They are not documented in [1], as far as I can see.
> True, but it works. I used the patched code all day long and did a *lot* of
> inserts using it. And if you look around the net, you'll find quite an amount
> of code that uses [[:space:]] and friends with preg_*().
>
> Hm, what now?
Well, Perl also seems to support that [1]: "(...) The POSIX character
class syntax [:class:] is also available. (...)". I cannot find any
comments on that in PHP changelog (if that has been added later), so I
guess support for it was always there. I would prefer to have a "clean"
PCRE, if we are moving to that, but I see that we are using POSIX
character classes at some place or another. So +1 to keep it like that,
as changing it wouldn't bring us anything.
But we should also try to avoid that when writing new PCRE's in new code.
Cheers,
Ernesto
[1] http://perldoc.perl.org/perlre.html
More information about the TYPO3-team-core
mailing list