|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-11-06 16:37 UTC] pete_cags at hotmail dot com
Description: ------------ The documentation located... http://www.php.net/manual/en/regexp.reference.unicode.php Contains the following text... "Extended properties such as "Greek" or "InMusicalSymbols" are not supported by PCRE." This is no longer the case as it DOES support Greek (and many other) characters. Reproduce code: --------------- N/A Expected result: ---------------- N/A Actual result: -------------- N/A Patchesadd-script-support (last revision 2010-05-21 13:51 UTC by pete_cags at hotmail dot com)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 19:00:01 2025 UTC |
Sorry it has taken me so long to get back to this, but at the time of reporting it I wasn't confident enough with Regular Expressions to dispute the bogus status. I have now asked for it to be re-opened as I'm confident it isn't bogus. Whilst InMusicalSymbols isn't supported, "Greek" is as are many other script types. The following code demonstrates this (I omitted the output in an attempt to avoid TL:DR). <?php header("Content-Type: text/html; charset=UTF-8"); $chars = array('Φ', 'a', '1'); foreach($chars as $char) { if( preg_match( '#\p{Greek}#u', $char ) ) { echo "{$char} is from the Greek script.<br/>"; } else { echo "{$char} is NOT from the Greek script.<br/>"; } } foreach($chars as $char) { if( preg_match( '#\p{invalid}#u', $char ) ) { echo "{$char} is from the Greek script.<br/>"; } else { echo "{$char} is NOT from the Greek script.<br/>"; } } ?> A full list of supported scripts can be found @ http://www.pcre.org/pcre.txt. If needs be I am happy to create a patch for the documents, but thought it only fair to re-open this bug in case further discussion is required first.