From e54e10ce558e4c97805e3ee4ebc425cb3be11034 Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Sun, 23 Jul 2017 16:31:26 +0900 Subject: [PATCH] update doc/RE for absent functions --- doc/RE | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/doc/RE b/doc/RE index f7f086f..9e4a048 100644 --- 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) 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) -- 2.40.0