summaryrefslogtreecommitdiffhomepage
path: root/misc/examples
diff options
context:
space:
mode:
Diffstat (limited to 'misc/examples')
-rw-r--r--misc/examples/regex2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/examples/regex2.c b/misc/examples/regex2.c
index 5718a1d8..734190cb 100644
--- a/misc/examples/regex2.c
+++ b/misc/examples/regex2.c
@@ -26,7 +26,7 @@ int main()
printf("\ninput: %s\n", s[i].input);
c_formatch (j, &re, s[i].input) {
- c_forrange (k, cregex_captures(&re))
+ c_forrange (k, cregex_captures(&re) + 1)
printf(" submatch %lld: %.*s\n", k, c_SV(j.match[k]));
}
}