#32314 [NEW]: Regular Expression
| From: | ostap333 at hotmail dot com | Date: | Tue, 15 Mar 2005 11:11:46 +0000 |
| Subject: | #32314 [NEW]: Regular Expression | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-75370@lists.php.net to get a copy of this message | ||
From: ostap333 at hotmail dot com
Operating system: WindowsXP
PHP version: 5.0.3
PHP Bug Type: Regexps related
Bug description: Regular Expression
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
--
Edit bug report at http://bugs.php.net/?id=32314&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32314&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32314&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32314&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32314&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32314&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32314&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32314&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32314&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32314&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32314&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=32314&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=32314&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32314&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32314&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32314&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32314&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32314&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32314&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32314&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32314&r=mysqlcfg