Actions
Bug #19888
closedUse of preg functions with ereg patterns
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-01-22
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
There are a bunch (see attached file) of preg_* calls using "[:alnum:]" and "[:space:]". This doesn't give any error but will not work as intended.
Here's a quick demo:
// replace "aceps:][" in the string with "s"
var_dump(preg_replace("/[[:space:]]*/", 's', 'ab cd fgh ijk nac'));
?>
(issue imported from #M10226)
Files
Updated by Oliver Hader almost 16 years ago
As I see this problem exists also in version before TYPO3 4.3...
Updated by Karsten Dambekalns almost 16 years ago
Ok, forget it. In my example the behaviour is correct. "Zero or more times whitespace" matches before every character, so... it's correct.
Further experiments showed that [:alnum:] and [:space:] are still valid in preg_* calls.
Updated by Karsten Dambekalns almost 16 years ago
Closing this and still wondering where on earth this is documented...
Actions