|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-04-24 22:29 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 08:00:01 2025 UTC |
Description: ------------ Hi. If you build a Regular Ex. like this: /([^\\]\|\*\|)/ there will be come an error, because 'PHP' think I mean with [^\\] I want backslashing the ']' so it will be do a error, because he want an ']' because it backslashed ']'. But I want the char '\', because thats a Specialchar ;-). Reproduce code: --------------- <?php // Result in Perl : Test1 - Test2\|*|Test3 $string = "Test1|*|Test2\|*|Test3"; $split = preg_split("/([^\\]\|\*\|)/", $string); ?> Expected result: ---------------- Warning: Compilation failed: missing terminating ] for character class at offset 17 in D:\Apache2\htdocs\GG_Shoutbox\msg.class.php on line 17