php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #64391 Contrary to the docs, "§" can't be used as delimiter
Submitted: 2013-03-08 12:51 UTC Modified: 2013-03-08 16:29 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: th dot geist at gmail dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.4.12 OS:
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: th dot geist at gmail dot com
New email:
PHP Version: OS:

 

 [2013-03-08 12:51 UTC] 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(): "

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-03-08 15:03 UTC] 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 16:29 UTC] th dot geist at gmail dot com
Ouch. I mistook § for a member of ASCII. My error.
 [2013-03-08 16:29 UTC] th dot geist at gmail dot com
-Status: Open +Status: Closed
 [2013-03-08 16:29 UTC] th dot geist at gmail dot com
Closing.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 21:00:01 2026 UTC