#include <stdio.h>
#include <regex.h>
int main(int argc, char** argv)
{
regex_t regex;
int value = regcomp(®ex, "[^A-Za-z]", 0);
value = regexec(®ex, argv[1], 0, NULL, 0);
printf("Found is Ok? (ok is zero): %d\n", value);
return 0;
}
#include <stdio.h>
int main(int argc, char** argv)
{
char c;
for(size_t i=0; c = argv[1][i]; i++)
{
if( ('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z') )
continue;
printf("Bad char\n");
}
return 0;
}