commit 891a4f7639486afb45827e857f1e7a41d770e735
parent 38baece7857592b5fe4e42d0a61d4512e32d6f22
Author: Vlad-Stefan Harbuz <vlad@vladh.net>
Date: Fri, 13 May 2022 16:41:16 +0100
regex: correct arguments in README
Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net>
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/regex/README b/regex/README
@@ -19,7 +19,7 @@ the longest match among the leftmost matches.
const re = regex::compile(`[Hh]are`)!;
defer regex::regex_finish(&re);
- const first_match = regex::find(re, "Hello Hare, hello Hare.")!;
+ const first_match = regex::find(&re, "Hello Hare, hello Hare.")!;
match (first_match) {
case void => void;
case let groups: []regex::matchgroup =>
@@ -28,7 +28,7 @@ the longest match among the leftmost matches.
// the main match, as well as all submatches.
};
- const all_matches = regex::findall(re, "Hello Hare, hello Hare.")!;
+ const all_matches = regex::findall(&re, "Hello Hare, hello Hare.")!;
match (all_matches) {
case void => void;
case let groupsets: [][]regex::matchgroup =>