php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32314 Regular Expression
Submitted: 2005-03-15 12:11 UTC Modified: 2005-03-15 12:43 UTC
From: ostap333 at hotmail dot com Assigned:
Status: Not a bug Package: Regexps related
PHP Version: 5.0.3 OS: WindowsXP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ostap333 at hotmail dot com
New email:
PHP Version: OS:

 

 [2005-03-15 12:11 UTC] ostap333 at hotmail dot com
Description:
------------
Hi
I was parsing the FreeDB and fouund that lots of regular expression combinations are not working as they would in perl.
Here is one example:




Reproduce code:
---------------
$word='?? 1 ????';
if (preg_match('/^(\D+?) +?(\d{1,}) +?(\D+?)$/',$word,$match))
{
   print "$match[1]\n$match[2]\n$match[2]\n";
};
//If i remove the '^' and '$' - it works 
//But than expression is not exactly what i want coz it 
//begins to match other stuff in different strings.




Expected result:
----------------
??
1
????


Actual result:
--------------
nono..nothing niks

given code works perfectly in perl

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-15 12:43 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Even if you think it is not a bug, we often know better than you,
please consult the support channels first before even considering
to reopen this report.

Thank you for your interest in PHP.

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 08 22:01:27 2024 UTC