php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22315 weird errors using \\
Submitted: 2003-02-19 22:51 UTC Modified: 2003-02-20 22:41 UTC
From: paj at pearfr dot org Assigned:
Status: Not a bug Package: PCRE related
PHP Version: 4.3.1 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: paj at pearfr dot org
New email:
PHP Version: OS:

 

 [2003-02-19 22:51 UTC] paj at pearfr dot org
$path='Hello\ World There is\ a\ dog';
$split=preg_split('/(?<!\\)\s+/',$path);
print_r($split);

returns:

Warning: Compilation failed: lookbehind assertion is not fixed length at offset 9 in /home/paj/projects/pear/core/test.php on line 17
/home/paj/projects/pear/core/test.php(17) : Warning - Compilation failed: lookbehind assertion is not fixed length at offset 9

$path='Hello\ World There is\ a\ dog';
$split=preg_split('/(?<!\\\)\s+/',$path);
print_r($split);

does not, but does not work as expected with others cases.

It seems to work with 4.3.0, a test url:
http://devel.akbkhome.com/regex.php
which runs 4.3.0, the 1st expression works correclty

pierre

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-20 17:08 UTC] pajoye@php.net
The 2nd script seems to work on 4.2.1, 4.2.2, 4.2.3, 4.3.0 and 4.3.1. Well, I can consider it as the way to do it.

pierre
 [2003-02-20 22:41 UTC] sniper@php.net
Bogused as discussed with Pierre on IRC.

 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Nov 28 03:03:14 2021 UTC