Doc #64391 [Opn->Csd]: Contrary to the docs, "§" can't be used as delimiter
| From: | th dot geist at gmail dot com | Date: | Fri, 08 Mar 2013 16:29:52 +0000 |
| Subject: | Doc #64391 [Opn->Csd]: Contrary to the docs, "§" can't be used as delimiter | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-9641@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64391&edit=1
ID: 64391
User updated by: th dot geist at gmail dot com
Reported by: th dot geist at gmail dot com
Summary: Contrary to the docs, "§" can't be used as
delimiter
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: 5.4.12
Block user comment: N
Private report: N
New Comment:
Closing.
Previous Comments:
------------------------------------------------------------------------
[2013-03-08 16:29:01] th dot geist at gmail dot com
Ouch. I mistook § for a member of ASCII. My error.
------------------------------------------------------------------------
[2013-03-08 15:03:13] salathe@php.net
The "§" character that you are trying to use consists of two bytes, while PCRE
only looks for one byte for a delimiter character.
------------------------------------------------------------------------
[2013-03-08 12:51:03] th dot geist at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/regexp.reference.delimiters
---
In the documentation, it says "A delimiter can be any non-alphanumeric, non-backslash,
non-whitespace character.".
This isn't true.
For example, the section sign "§" can't be used as a delimiter.
Test script:
---------------
preg_match("§hello§", "hello");
Expected result:
----------------
Match successful
Actual result:
--------------
Error output:
"preg_match(): "
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64391&edit=1