From: info at giggygsk dot de Operating system: Win32 PHP version: 4.3.4 PHP Bug Type: *Regular Expressions Bug description: Error in Backslashing
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 -- Edit bug report at http://bugs.php.net/?id=28138&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28138&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28138&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28138&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28138&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28138&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28138&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28138&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28138&r=support Expected behavior: http://bugs.php.net/fix.php?id=28138&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28138&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28138&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28138&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28138&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28138&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28138&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28138&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28138&r=float