$matches=array();
preg_match_all($regex, $fragment, $matches, PREG_PATTERN_ORDER);
I get the following error for the input $regex = [\]world[\] and $fragment = hello world:
Severity: Warning
Message: preg_match_all() [function.preg-match-all]: Compilation failed: missing terminating ] for character class at offset 11
Filename: controllers/admin.php
Line Number: 499
can someone please help ?? :(