#include
#include
#include
#include
#include
#include
int main(void) {
char line[1024];
char delim[] = "<> \t\n";
char *word = NULL;
int retval = 0;
regex_t re;
setlocale(LC_ALL, "");
if(regcomp(&re, "href", REG_ICASE) != 0)
return 1;
while((fgets(line, 1024, stdin)) != NULL) {
word = strtok(line, delim);
while(word != NULL) {
if((retval = regexec(&re, word, 0, NULL, 0)) == 0)
printf("%s\n", word);
word = strtok(NULL, delim);
}
}
return 0;
}