- return regexec(&matcher->preg, string, 0, 0, 0) == 0;
+ if(regexec(&matcher->preg, string, 1, &matches, 0) == 0) {
+ if(switches) {
+ *nb_switches = 2;
+ switches[0] = matches.rm_so;
+ switches[1] = matches.rm_eo;
+ }
+ return 1;
+ } else {
+ return 0;
+ }