regex.3: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2020-12-20 12:01:36 +01:00
parent 87e8e9e479
commit 5b2ab95fed
1 changed files with 2 additions and 1 deletions

View File

@ -370,7 +370,8 @@ int main(void)
off = pmatch[0].rm_so + (s \- str);
len = pmatch[0].rm_eo \- pmatch[0].rm_so;
printf("#%d:\en", i);
printf("offset = %jd; length = %jd\en", (intmax_t) off, (intmax_t) len);
printf("offset = %jd; length = %jd\en", (intmax_t) off,
(intmax_t) len);
printf("substring = \e"%.*s\e"\en", len, s + pmatch[0].rm_so);
s += pmatch[0].rm_eo;