note 107498 added to reference.pcre.pattern.modifiers
| From: | DanielKlein | Date: | Mon, 13 Feb 2012 23:40:22 +0000 |
| Subject: | note 107498 added to reference.pcre.pattern.modifiers | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-186110@lists.php.net to get a copy of this message | ||
If the _subject_ contains utf-8 sequences the 'u' modifier should be set, otherwise a
pattern such as /./ could match a utf-8 sequence as two to four individual ASCII characters. It is
not a requirement, however, as you may have a need to break apart utf-8 sequences into single bytes.
Most of the time, though, if you're working with utf-8 strings you should use the 'u'
modifier.
If the subject doesn't contain any utf-8 sequences (i.e. characters in the range 0x00-0x7F
only) but the pattern does, as far as I can work out, setting the 'u' modifier would have
no effect on the result.
----
Server IP: 69.147.83.197
Probable Submitter: 115.64.131.178
----
Manual Page -- http://www.php.net/manual/en/reference.pcre.pattern.modifiers.php
Edit -- https://master.php.net/note/edit/107498
Del: integrated -- https://master.php.net/note/delete/107498/integrated
Del: useless -- https://master.php.net/note/delete/107498/useless
Del: bad code -- https://master.php.net/note/delete/107498/bad+code
Del: spam -- https://master.php.net/note/delete/107498/spam
Del: non-english -- https://master.php.net/note/delete/107498/non-english
Del: in docs -- https://master.php.net/note/delete/107498/in+docs
Del: other reasons-- https://master.php.net/note/delete/107498
Reject -- https://master.php.net/note/reject/107498
Search -- https://master.php.net/manage/user-notes.php