Lines Matching defs:re
36 regex_t re;
55 _re_comp(regexp_t* re, const char* pattern, char* handle, unsigned int size)
65 n = regcomp(&env->re, pattern, REG_LENIENT|REG_NULL);
89 re->re_nbra = env->re.re_nsub;
94 _re_exec(regexp_t* re, const char* subject, const char* handle, int anchor)
98 regmatch_t match[elementsof(re->re_braslist)+1];
100 if (regexec(&env->re, subject, elementsof(match), match, 0) || anchor && match[0].rm_so)
102 re->re_loc1 = (char*)subject + match[0].rm_so;
103 re->re_loc2 = (char*)subject + match[0].rm_eo;
104 for (n = 1; n <= env->re.re_nsub; n++)
106 re->re_braslist[n-1] = (char*)subject + match[n].rm_so;
107 re->re_braelist[n-1] = (char*)subject + match[n].rm_eo;