#35772 [Opn->Bgs]: preg_match don't match right...
| From: | sniper@php.net | Date: | Thu, 22 Dec 2005 13:17:19 +0000 |
| Subject: | #35772 [Opn->Bgs]: preg_match don't match right... | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-90877@lists.php.net to get a copy of this message | ||
ID: 35772
Updated by: sniper@php.net
Reported By: nwhunter at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Regexps related
Operating System: Debian
PHP Version: 5.1.1
New Comment:
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. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2005-12-22 13:45:30] nwhunter at gmail dot com
Description:
------------
problem with preg_match, dont match right if string contain something
eg. \x1d<DIR>s\x1f\x1f\x1f\x1f\x1f\x1faa .
Reproduce code:
---------------
<?
$cn1 = "{__directr[15]} <DIR> aa"; // ok
$cn2 = "{__directr[15]}\x1d<DIR>s\x1f\x1f\x1f\x1f\x1f\x1faa";
// not ok
if(preg_match("/^(\{\_\_+[a-z]+\[+(.*)+\]\})/i", $cn1))
print("ok<br/>");
else
print("not ok<br/>");
if(preg_match("/^(\{\_\_+[a-z]+\[+(.*)+\]\})/i", $cn2))
print("ok<br/>");
else
print("not ok<br/>");
?>
Expected result:
----------------
ok
ok
Actual result:
--------------
ok
not ok
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35772&edit=1