php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26330 inconsistent behaviour of \b for win&*nix?
Submitted: 2003-11-20 08:19 UTC Modified: 2003-11-20 19:26 UTC
From: space at outthere dot net Assigned:
Status: Not a bug Package: PCRE related
PHP Version: 4.3.4 OS: win/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: space at outthere dot net
New email:
PHP Version: OS:

 

 [2003-11-20 08:19 UTC] space at outthere dot net
Description:
------------
running a regexp in windows and later on linux yeilded different results: 

$new = preg_replace("/\b?sterreich\b/i", "A", "Germany ?sterreich France");

will replace on windows systems but will fail on unix boxes. 





Reproduce code:
---------------
$new = preg_replace("/\b?sterreich\b/i", "A", "Germany ?sterreich France");
print $new;




Expected result:
----------------
Germany A France


Actual result:
--------------
win: 
> Germany A France
linux:
> Germany ?sterreich France


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-20 19:26 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

\b is locale dependant and I suspect the locales on your Win32 and Linux servers differ, hence the different behaviour.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 11:01:30 2024 UTC