From 7ed8a52668f84a6785cf50b889e12a00c0ea57d8 Mon Sep 17 00:00:00 2001 From: mingun Date: Thu, 19 Sep 2013 00:39:53 +0600 Subject: [PATCH] #30: Add description of new range feature to README. --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index faee1b1a0..62bdf59ab 100644 --- a/README.md +++ b/README.md @@ -293,6 +293,21 @@ expression as many times as possible. Try to match the expression. If the match succeeds, return its match result, otherwise return `null`. +#### *expression* |count|
*expression* |min..max| + +Match exact `count` repetitions of `expression`. If the match succeeds, return +their match results in an array. + +-or- + +Match expression at least `min` but not more then `max` times. If the match +succeeds, return their match results in an array. Both `min` and `max` may +be omitted. If `min` omitted, then suppose to `0`. If `max` is omitted, then +suppose to infinity. `expression |..|` equivalently `expression |0..|` and +`expression *`. `expression |1..|` equivalently `expression +`. + +`count`, `min` and `max` must be positive integers. + #### & *expression* Try to match the expression. If the match succeeds, just return `undefined` and