]> granicus.if.org Git - onig/commitdiff
update doc/RE for absent functions
authorK.Kosako <kkosako0@gmail.com>
Sun, 23 Jul 2017 07:31:26 +0000 (16:31 +0900)
committerK.Kosako <kkosako0@gmail.com>
Sun, 23 Jul 2017 07:31:26 +0000 (16:31 +0900)
doc/RE

diff --git a/doc/RE b/doc/RE
index f7f086fdecbeb6138f69c7c869c85b4d4e1dda40..9e4a0480d99959d2fc0fe44c98eb70bf79b847b0 100644 (file)
--- a/doc/RE
+++ b/doc/RE
@@ -1,4 +1,4 @@
-Oniguruma Regular Expressions Version 6.5.0    2017/07/18
+Oniguruma Regular Expressions Version 6.5.0    2017/07/23
 
 syntax: ONIG_SYNTAX_RUBY (default)
 
@@ -240,27 +240,38 @@ syntax: ONIG_SYNTAX_RUBY (default)
 
                      Assigning the same name to two or more subexps is allowed.
 
-  (?~absent_exp)     Absent group    (* proposed by Tanaka Akira)
+  <absent functions>
+
+  (?~absent)         Absent repeater    (* proposed by Tanaka Akira)
                      This works like .* (more precisely \O*), but it is
                      limited by the range that does not include the string
-                     match with absent_exp.
-                     \O* is used as a default generator.
-                     Therefore this is not affected by the multi-line option (?m).
+                     match with absent.
+                     This is a written abbreviation of (?~|absent|\O*).
+                     \O* is used as a repeater.
+
+  (?~|absent|exp)    Absent group  (* original)
+                     This works like "exp", but it is limited by the range
+                     that does not include the string match with absent.
+
+                     ex. (?~|345|\d*)  "12345678"  ==> "12", "1", ""
 
-  (?~|generator|absent_exp)   Absent group with custom generator  (* original)
-                              Generator must be a greedy or possessive quantifier.
+  (?~|absent)        Absent cutter (* original)
+                     After passed this operator, string right range is limited
+                     at the point that does not include the string match whth
+                     absent.
 
-                              ex. (?~|\d*|345)
-                                  (?~|(?:abc|de|f){0,100}|def)
+     * Nested absent repeater/group is not supported and the behavior
+       is undefined.
 
 
   (?(condition_exp)then_exp|else_exp)    if-then-else
   (?(condition_exp)then_exp)             if-then
 
-               condition_exp can be a backreference number/name or normal regular
-               expression.
-               When condition_exp is backreference, both then_exp and else_exp
-               can be omitted. Then it works as a backreference validity checker.
+               condition_exp can be a backreference number/name or a normal
+               regular expression.
+               When condition_exp is a backreference, both then_exp and
+               else_exp can be omitted.
+               Then it works as a backreference validity checker.
 
   [ backreference validity checker ]   (* original function)