note 96479 added to regexp.reference.unicode
| From: | suit at rebell dot at | Date: | Mon, 01 Mar 2010 13:13:08 +0000 |
| Subject: | note 96479 added to regexp.reference.unicode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-166467@lists.php.net to get a copy of this message | ||
these properties are usualy only available if PCRE is compiled with
"--enable-unicode-properties"
if you want to match any word but want to provide a fallback, you can do something like that:
if(@preg_match_all('/\p{L}+/u', $str, $arr) {
// fallback goes here
// for example just '/\w+/u' for a less acurate match
}
----
Server IP: 69.147.83.197
Probable Submitter: 81.223.129.178
----
Manual Page -- http://www.php.net/manual/en/regexp.reference.unicode.php
Edit -- https://master.php.net/note/edit/96479
Del: integrated -- https://master.php.net/note/delete/96479/integrated
Del: useless -- https://master.php.net/note/delete/96479/useless
Del: bad code -- https://master.php.net/note/delete/96479/bad+code
Del: spam -- https://master.php.net/note/delete/96479/spam
Del: non-english -- https://master.php.net/note/delete/96479/non-english
Del: in docs -- https://master.php.net/note/delete/96479/in+docs
Del: other reasons-- https://master.php.net/note/delete/96479
Reject -- https://master.php.net/note/reject/96479
Search -- https://master.php.net/manage/user-notes.php