From 380cd3de4d70fa7945b4a9e6eead2f19f4540fce Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Fri, 29 Mar 2019 10:12:55 +0900 Subject: [PATCH] update doc/RE --- doc/RE | 61 +++++++++++++++++++++++++------------------------------ doc/RE.ja | 23 +++++++-------------- 2 files changed, 35 insertions(+), 49 deletions(-) diff --git a/doc/RE b/doc/RE index a14a8ea..117b5bc 100644 --- a/doc/RE +++ b/doc/RE @@ -1,4 +1,4 @@ -Oniguruma Regular Expressions Version 6.9.2 2019/03/28 +Oniguruma Regular Expressions Version 6.9.2 2019/03/29 syntax: ONIG_SYNTAX_ONIGURUMA (default) @@ -248,23 +248,24 @@ syntax: ONIG_SYNTAX_ONIGURUMA (default) (?imxWDSPy-imxWDSP:subexp) option on/off for subexp - i: ignore case - m: multi-line (dot (.) also matches newline) - x: extended form - W: ASCII only word (\w, \p{Word}, [[:word:]]) - ASCII only word bound (\b) - D: ASCII only digit (\d, \p{Digit}, [[:digit:]]) - S: ASCII only space (\s, \p{Space}, [[:space:]]) - P: ASCII only POSIX properties (includes W,D,S) - (alnum, alpha, blank, cntrl, digit, graph, - lower, print, punct, space, upper, xdigit, word) - - y{?}: Text Segment mode - This option changes the meaning of \X, \y, \Y. - y{g}: Extended Grapheme Cluster mode (default) - y{w}: Word mode - This mode is supported in Unicode only. - See [Unicode Standard Annex #29] + i: ignore case + m: multi-line (dot (.) also matches newline) + x: extended form + W: ASCII only word (\w, \p{Word}, [[:word:]]) + ASCII only word bound (\b) + D: ASCII only digit (\d, \p{Digit}, [[:digit:]]) + S: ASCII only space (\s, \p{Space}, [[:space:]]) + P: ASCII only POSIX properties (includes W,D,S) + (alnum, alpha, blank, cntrl, digit, graph, + lower, print, punct, space, upper, xdigit, word) + + y{?}: Text Segment mode + This option changes the meaning of \X, \y, \Y. + Currently, this option is supported in Unicode only. + + y{g}: Extended Grapheme Cluster mode (default) + y{w}: Word mode + See [Unicode Standard Annex #29] (?imxWDSPy-imxWDSP) isolated option @@ -502,10 +503,15 @@ A-1. Syntax-dependent options A-2. Original extensions - + hexadecimal digit char type \h, \H - + named group (?...), (?'name'...) - + named backref \k - + subexp call \g, \g + + hexadecimal digit char type \h, \H + + true anychar \O + + text segment boundary \y, \Y + + backreference validity checker (?(...)) + + named group (?...), (?'name'...) + + named backref \k + + subexp call \g, \g + + absent expression (?~|...|...) + + absent stopper (?|...) A-3. Missing features compared with perl 5.8.0 @@ -560,15 +566,4 @@ A-4. Differences with Japanized GNU regex(version 0.12) of Ruby 1.8 /(?:()|())*\1\2/ =~ "" /(?:\1a|())*/ =~ "a" - -A-5. Features disabled in default syntax - - + capture history - - (?@...) and (?@...) - - ex. /(?@a)*/.match("aaa") ==> [<0-1>, <1-2>, <2-3>] - - see sample/listcap.c file. - // END diff --git a/doc/RE.ja b/doc/RE.ja index f5d3d32..926158b 100644 --- a/doc/RE.ja +++ b/doc/RE.ja @@ -1,4 +1,4 @@ -鬼車 正規表現 Version 6.9.2 2019/03/28 +鬼車 正規表現 Version 6.9.2 2019/03/29 使用文法: ONIG_SYNTAX_ONIGURUMA (既定値) @@ -257,9 +257,9 @@ y{?}: 文章区分状態 このオプションは\X, \y, \Yの意味を変更する。 + 現在このオプションはUnicodeでしかサポートしていない y{g}: 拡張書記素房-状態 (デフォルト) y{w}: 単語-状態 - 現在このモードはUnicodeでしかサポートしていない 参照 [Unicode Standard Annex #29] (?imxWDSPy-imxWDSP) 孤立オプション @@ -511,9 +511,14 @@ 補記 2. 独自拡張機能 + 16進数数字、非16進数字 \h, \H + + 真任意文字 \O + + 文章区分境界 \y, \Y + + 後方参照値有効性確認器 (?(...)) + 名前付き捕獲式集合 (?...), (?'name'...) + 名前指定後方参照 \k + 部分式呼出し \g, \g + + 不在式 (?~|...|...) + + 不在停止 (?|...) 補記 3. Perl 5.8.0と比較して存在しない機能 @@ -568,18 +573,4 @@ /(?:()|())*\1\2/ =~ "" /(?:\1a|())*/ =~ "a" - - -補記 5. 実装されているが、既定値では有効にしていない機能 - - + 捕獲履歴参照 - - (?@...) と (?@...) - - 例. /(?@a)*/.match("aaa") ==> [<0-1>, <1-2>, <2-3>] - - 使用方法は、sample/listcap.cを参照 - - 有効にしていない理由は、どの程度役に立つかはっきりしないため。 - 終り -- 2.40.0