Thanks for the suggestions.
Though still confused by pointers, I seem to have got it working thus:
static int check (const struct dirent *regcheck)
regex_t * myregex = calloc(1, sizeof(regex_t));
if (NULL == myregex)
// Compile the regular expression
rc = regcomp( myregex, "^.*\\.zip$", REG_EXTENDED | REG_NOSUB );
if (0 == regexec(myregex,regcheck->d_name, 0, 0, 0))
As suggested it doesn't compile with the -ansi flag.
scandir(dir, &eps, check, alphasort);