From ca3e72ee27be61ea5d89357867906da9cd0b2f05 Mon Sep 17 00:00:00 2001 From: Flaviu Tamas Date: Fri, 16 Jan 2015 19:10:48 -0500 Subject: [PATCH] Add `match(...)` to documentation --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 303506bd85..5ffb2e5a0b 100644 --- a/README.md +++ b/README.md @@ -68,3 +68,19 @@ passed in order to encourage readable expressions, so `[0-9]+` is equivalent to `Sx` is enabled by default in order to encourage use of whitespace for better readability. + +## Usage + +### `proc match(str: string, pattern: Regex, start = 0, endpos = -1): RegexMatch` +Tries to match the pattern, starting at start. This means that +`"foo".match(re"f") == true`, but `"foo".match(re"o") == false`. + +
+
`start`
+
The start point at which to start matching. `|abc` is `0`; `a|bc` is +`1`
+ +
`endpos`
+
The maximum index for a match; `-1` means the end of the string, otherwise +it's an exclusive upper bound.
+