Regular expressions: Difference between revisions

(C)
Line 35:
regex_t preg;
regmatch_t substmatch[1];
const char *tp = "string$";
const char *t1 = "this is a matching string";
const char *t2 = "this is not a matching string!";
const char *ss = "istyfied";
regcomp(&preg, "string$", REG_EXTENDED);
Line 65:
}
regfree(&preg);
return 0;
}</c>
 
Anonymous user