mirror of https://github.com/mkerrisk/man-pages
regex.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
87e8e9e479
commit
5b2ab95fed
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue