7 main (int argc
, char *argv
[])
13 if (setlocale (LC_ALL
, "de_DE.ISO-8859-1") == NULL
)
14 puts ("cannot set locale");
15 else if (regcomp (&re
, "[a-f]*", 0) != REG_NOERROR
)
16 puts ("cannot compile expression \"[a-f]*\"");
17 else if (regexec (&re
, "abcdefCDEF", 1, mat
, 0) == REG_NOMATCH
)
21 printf ("match from %d to %d\n", mat
[0].rm_so
, mat
[0].rm_eo
);
22 res
= mat
[0].rm_so
!= 0 || mat
[0].rm_eo
!= 6;