Project

General

Profile

Actions

Bug #19888

closed

Use of preg functions with ereg patterns

Added by Karsten Dambekalns almost 16 years ago. Updated almost 16 years ago.

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

preg-with-ereg-pattern.txt (3.3 KB) preg-with-ereg-pattern.txt Administrator Admin, 2009-01-22 14:22
Actions #1

Updated by Oliver Hader almost 16 years ago

As I see this problem exists also in version before TYPO3 4.3...

Actions #2

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.

Actions #3

Updated by Karsten Dambekalns almost 16 years ago

Closing this and still wondering where on earth this is documented...

Actions

Also available in: Atom PDF