mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Add encoding note
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@343080 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
8ea5a6ef51
commit
3ba4f80426
1 changed files with 6 additions and 1 deletions
|
@ -4,7 +4,12 @@
|
|||
<chapter xml:id="parle.pattern.matching" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Parle pattern matching</title>
|
||||
<titleabbrev>Pattern matching</titleabbrev>
|
||||
<para>Parle supports regex matching similar to flex. Also supported are the following POSIX character sets: <literal>[:alnum:]</literal>, <literal>[:alpha:]</literal>, <literal>[:blank:]</literal>, <literal>[:cntrl:]</literal>, <literal>[:digit:]</literal>, <literal>[:graph:]</literal>, <literal>[:lower:]</literal>, <literal>[:print:]</literal>, <literal>[:punct:]</literal>, <literal>[:space:]</literal>, <literal>[:upper:]</literal> and <literal>[:xdigit:]</literal>.</para>
|
||||
<para>
|
||||
Parle supports regex matching similar to flex. Also supported are the following POSIX character sets: <literal>[:alnum:]</literal>, <literal>[:alpha:]</literal>, <literal>[:blank:]</literal>, <literal>[:cntrl:]</literal>, <literal>[:digit:]</literal>, <literal>[:graph:]</literal>, <literal>[:lower:]</literal>, <literal>[:print:]</literal>, <literal>[:punct:]</literal>, <literal>[:space:]</literal>, <literal>[:upper:]</literal> and <literal>[:xdigit:]</literal>.
|
||||
</para>
|
||||
<para>
|
||||
The Unicode character classes are currently not supported. The underlying library supports it through UTF-32, at the moment it is not implemented. A particular encoding however is supported when the correctly constructed regex. For example, to match the EURO symbol encoded in UTF-8, the regular expression <literal>[\xE2][\x82][\xAC]</literal> can be used. Or in general, the regex matching a UTF-8 encoded string could be <literal>[ -\x7f]{+}[\x80-\xbf]{+}[\xc2-\xdf]{+}[\xe0-\xef]{+}[\xf0-\xff]{-}[\"\\\]|\\\([\"\\\/bfnrt]|u[0-9a-fA-F]{4})</literal>.
|
||||
</para>
|
||||
<section xml:id="parle.regex.chars">
|
||||
<title>Character representations</title>
|
||||
<para>
|
||||
|
|
Loading…
Reference in a new issue